Class: Devise::Strategies::SamlAuthenticatable
- Inherits:
-
Authenticatable
- Object
- Authenticatable
- Devise::Strategies::SamlAuthenticatable
- Includes:
- DeviseSamlAuthenticatable::SamlConfig
- Defined in:
- lib/devise_saml_authenticatable/strategy.rb
Instance Method Summary collapse
- #authenticate! ⇒ Object
-
#store? ⇒ Boolean
This method should turn off storage whenever CSRF cannot be verified.
- #valid? ⇒ Boolean
Methods included from DeviseSamlAuthenticatable::SamlConfig
Instance Method Details
#authenticate! ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/devise_saml_authenticatable/strategy.rb', line 19 def authenticate! parse_saml_response retrieve_resource unless self.halted? unless self.halted? @resource.after_saml_authentication(@response.sessionindex) success!(@resource) end end |
#store? ⇒ Boolean
This method should turn off storage whenever CSRF cannot be verified. Any known way on how to let the IdP send the CSRF token along with the SAMLResponse ? Please let me know!
31 32 33 |
# File 'lib/devise_saml_authenticatable/strategy.rb', line 31 def store? !mapping.to.skip_session_storage.include?(:saml_auth) end |
#valid? ⇒ Boolean
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/devise_saml_authenticatable/strategy.rb', line 7 def valid? if params[:SAMLResponse] OneLogin::RubySaml::Response.new( params[:SAMLResponse], settings: Devise.saml_config, allowed_clock_drift: Devise.allowed_clock_drift_in_seconds, ) else false end end |