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
15 16 17 18 19 20 21 22 |
# File 'lib/devise_saml_authenticatable/strategy.rb', line 15 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!
27 28 29 |
# File 'lib/devise_saml_authenticatable/strategy.rb', line 27 def store? !mapping.to.skip_session_storage.include?(:saml_auth) end |
#valid? ⇒ Boolean
7 8 9 10 11 12 13 |
# File 'lib/devise_saml_authenticatable/strategy.rb', line 7 def valid? if params[:SAMLResponse] OneLogin::RubySaml::Response.new(params[:SAMLResponse]) else false end end |