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
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/devise_saml_authenticatable/strategy.rb', line 18 def authenticate! parse_saml_response retrieve_resource unless self.halted? unless self.halted? if Devise.saml_session_index_key request.session[Devise.saml_session_index_key] = @response.sessionindex end 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!
32 33 34 |
# File 'lib/devise_saml_authenticatable/strategy.rb', line 32 def store? !mapping.to.skip_session_storage.include?(:saml_auth) end |
#valid? ⇒ Boolean
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/devise_saml_authenticatable/strategy.rb', line 7 def valid? if params[:SAMLResponse] OneLogin::RubySaml::Response.new( params[:SAMLResponse], , ) else false end end |