Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Gems You Might Not Need - Authentication and Au...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Brandon Beacher
March 30, 2012
Programming
380
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Gems You Might Not Need - Authentication and Authorization
Brandon Beacher
March 30, 2012
More Decks by Brandon Beacher
See All by Brandon Beacher
Ruby for Recruiters
brandon_beacher
1
85
Academic Software Development Collaboration Tools
brandon_beacher
3
190
Other Decks in Programming
See All in Programming
Loosening the Reins: Go Generics Get More Flexible
kuro_kurorrr
0
360
ハーネス設計入門 〜プロンプト、コンテキストの次〜
kinopeee
51
32k
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
230
【QA Test Talk Vol.8】AI-DLC による Whole Team Approach の加速
pkshadeck
PRO
0
270
AIと壁打ちしながら進めるコスト管理
fufuhu
2
1.9k
AWS Transform Customによる Spring Boot 2.xから4.xへのVerUp
satoshi256kbyte
2
120
[PyCon KR 2026] More Variants, More Diversity for AI Accelerators
achimnol
0
130
AIの中の人になってみる
htkym
0
150
【DroidKaigi 2026】「アクセシビリティを利用するとき、 アクセシビリティもまたこちらを利用している」 〜マルウェアによる攻撃と防衛について〜
halunoyo
0
160
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
130
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
2
420
PyO3 で既存 Python 評価器を Rust core 化する ー wasm-bindgen でブラウザにも配るための設計
kdash
1
130
Featured
See All Featured
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
830
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.2k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.3k
Embracing the Ebb and Flow
colly
88
5.2k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Designing Experiences People Love
moore
143
24k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Scaling GitHub
holman
464
140k
The SEO identity crisis: Don't let AI make you average
varn
0
550
RailsConf 2023
tenderlove
30
1.5k
Transcript
Gems You Might Not Need Authentication and Authorization
Authentication Who are you? Authorization Are you allowed to do
that?
Do I need an authentication gem? Maybe not...
has_secure_password • Built in to newer versions of Rails •
Adds methods to set and authenticate against a BCrypt password. • This mechanism requires you to have a password_digest attribute. https://gist.github.com/2252946
Invitations • Add an invitation_token string attribute to your model
• Generate the token with ActiveSupport:: SecureRandom.hex https://gist.github.com/2253047
Do I need an authorization gem? Maybe not...
Before filters • Methods with redirects https://gist.github.com/2253206
Before filters - a step further • Stay flexible to
meet needs https://gist.github.com/3f28fd45a9755dfafd72
The Forbid pattern • When you need to get more
granular than before filters • class ForbiddenError < StandardError • rescue_from ForbiddenError https://gist.github.com/2253303
The Forbid pattern - a step further • Stay flexible
to meet business needs https://gist.github.com/2253352
The End • Simple • Flexible • Easy to understand