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
Devise @ Rails Summit 2009
Search
Carlos Antonio
October 13, 2009
Programming
1
84
Devise @ Rails Summit 2009
Lightning Talk releasing Devise.
Carlos Antonio
October 13, 2009
Tweet
Share
More Decks by Carlos Antonio
See All by Carlos Antonio
Contribuindo para Open Source @ 1º Tech Day GURU- PR
carlosantoniodasilva
2
230
Contributing to Open Source: from beginning to lessons learned @ Tropical Ruby 2015
carlosantoniodasilva
5
430
Os truques que o Rails não te contou @ RubyConf Brasil 2014
carlosantoniodasilva
20
830
Os truques que o Rails não te contou @ TDC Floripa 2014
carlosantoniodasilva
18
950
Tricks that Rails didn't tell you about @ RailsConf 2014
carlosantoniodasilva
76
11k
Integração de gems com o Rails @ RS on Rails
carlosantoniodasilva
2
150
Escrevendo Aplicações Melhores @ RubyConf Brasil
carlosantoniodasilva
3
140
Railties @ WyeWorks
carlosantoniodasilva
1
94
Plataformatec's Hacking Evenings @ RubyConf Uruguay
carlosantoniodasilva
1
87
Other Decks in Programming
See All in Programming
React 19でお手軽にCSS-in-JSを自作する
yukukotani
5
570
DMMオンラインサロンアプリのSwift化
hayatan
0
190
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
6
700
ゼロからの、レトロゲームエンジンの作り方
tokujiros
3
1.1k
最近のVS Codeで気になるニュース 2025/01
74th
1
100
どうして手を動かすよりもチーム内のコードレビューを優先するべきなのか
okashoi
3
870
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
1.3k
ErdMap: Thinking about a map for Rails applications
makicamel
1
660
rails newと同時に型を書く
aki19035vc
5
710
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
410
テストコード書いてみませんか?
onopon
2
340
BEエンジニアがFEの業務をできるようになるまでにやったこと
yoshida_ryushin
0
200
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
Done Done
chrislema
182
16k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.4k
Typedesign – Prime Four
hannesfritz
40
2.5k
How to train your dragon (web standard)
notwaldorf
89
5.8k
The Cult of Friendly URLs
andyhume
78
6.1k
Optimizing for Happiness
mojombo
376
70k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
960
Building Flexible Design Systems
yeseniaperezcruz
328
38k
A better future with KSS
kneath
238
17k
Transcript
Plataforma 2009 Autenticação flexível com Devise http://github.com/plataformatec/devise
None
Plataforma 2009 Soluções Existentes
Plataforma 2009 Clearance • Pontos positivos – Estrutura completa, como
engine (MVC) – Confirmação de conta – Recuperação de senha • Pontos negativos – Pouco flexível (apenas model User) – Não modularizado
Plataforma 2009 Authlogic • Pontos positivos – Modelo bem flexível
– Criptografia – Magic columns • Pontos negativos – Não é solução completa (MVC) como o Clearance – Trata a sessão como modelo
Plataforma 2009 Nossa proposta
Plataforma 2009 Devise • Pontos positivos – Rack based (via
Warden): Rails, Metal, Sinatra – Solução completa (MVC), como engine – Múltiplos roles (logar como admin, user, ...) – Modular e flexível • Pontos negativos – Pouca base instalada – Menos de 10 watchers no github
Plataforma 2009 class User < ActiveRecord::Base devise :authenticable end
Plataforma 2009 class User < ActiveRecord::Base devise :confirmable end
Plataforma 2009 class User < ActiveRecord::Base devise :recoverable end
Plataforma 2009 class User < ActiveRecord::Base devise :validatable end
Plataforma 2009 class User < ActiveRecord::Base devise :all end
Plataforma 2009 ActionController::Routing::Routes.draw do |map| map.devise_for :users end
Plataforma 2009 ...tem mais coisa vindo
Plataforma 2009 Proteção contra Brute Force self.attempts_count = 10 self.attempts_timeframe
= 2.hours
Plataforma 2009 Remember me self.remember_me = 2.weeks
Plataforma 2009 Migratable create_table :users do |t| t.authenticable t.confirmable end
Plataforma 2009 Magic colums self.login_count self.last_request_at self.last_login_ip
Plataforma 2009 github.com/plataformatec/devise blog.plataformatec.com.br