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
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/devise_saml_authenticatable/strategy.rb', line 9 def authenticate! @response = OneLogin::RubySaml::Response.new(params[:SAMLResponse]) @response.settings = get_saml_config resource = mapping.to.authenticate_with_saml(@response.attributes) if @response.is_valid? success!(resource) else fail!(:invalid) 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!
23 24 25 |
# File 'lib/devise_saml_authenticatable/strategy.rb', line 23 def store? true end |
#valid? ⇒ Boolean
6 7 8 |
# File 'lib/devise_saml_authenticatable/strategy.rb', line 6 def valid? params[:SAMLResponse] end |