Class: Devise::Strategies::JiraAuthenticable
- Inherits:
-
Authenticatable
- Object
- Authenticatable
- Devise::Strategies::JiraAuthenticable
- Defined in:
- lib/devise/strategies/jira_authenticable.rb
Overview
Strategy for authenticating users with a JIRA server. If authentication with the JIRA server fails, allow warden to move on to the next strategy. When authentication succeeds and Devise indicates that the resource has been successfully validated, invoke the after_jira_authentication
callback on the resource and let warden know we were successful and not to continue with executing further strategies.
Instance Method Summary collapse
-
#authenticate! ⇒ Object
Invoked by warden to execute the strategy.
Instance Method Details
#authenticate! ⇒ Object
Invoked by warden to execute the strategy.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/devise/strategies/jira_authenticable.rb', line 13 def authenticate! auth_params = authentication_hash.merge(:password => password) resource = valid_password? && mapping.to.find_for_jira_authentication(auth_params) return fail(:invalid) unless resource if validate(resource) success!(resource) end end |