Method: Aker::Modes::Base#authenticate!

Defined in:
lib/aker/modes/base.rb

#authenticate!void

This method returns an undefined value.

Authenticates a user.

#authenticate! expects kind and credentials to be defined. See subclasses for examples.

If authentication is successful, then success! (from Warden::Strategies::Base) is called with a User object. If authentication fails, then nothing is done.



79
80
81
82
# File 'lib/aker/modes/base.rb', line 79

def authenticate!
  user = authority.valid_credentials?(kind, *credentials)
  success!(user) if user
end