Class: DeviseLoginCookie::Strategy
- Inherits:
-
Devise::Strategies::Authenticatable
- Object
- Devise::Strategies::Authenticatable
- DeviseLoginCookie::Strategy
- Defined in:
- lib/devise_login_cookie/strategy.rb
Constant Summary collapse
- COOKIE_TTL =
TODO: configurable TTL
86400
Instance Attribute Summary collapse
-
#secret_token ⇒ Object
for non-Rails test environment.
Instance Method Summary collapse
Instance Attribute Details
#secret_token ⇒ Object
for non-Rails test environment.
11 12 13 |
# File 'lib/devise_login_cookie/strategy.rb', line 11 def secret_token @secret_token end |
Instance Method Details
#authenticate! ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/devise_login_cookie/strategy.rb', line 17 def authenticate! if fresh?() && resource && validate(resource) success!(resource) else pass end end |
#valid? ⇒ Boolean
13 14 15 |
# File 'lib/devise_login_cookie/strategy.rb', line 13 def valid? .valid? end |