class Athena::Security::Events::LoginSuccess
inherits Athena::Contracts::EventDispatcher::Event
#
Emitted once a user was authenticated and its token was set on the token storage, e.g. to upgrade its password.
Listeners may replace the response the authenticator returned.
Constructors#
.new(authenticator : ASEC::Authenticator::Interface, passport : ASEC::Authenticator::Passport, authenticated_token : ASEC::Authentication::Token::Interface, request : AHTTP::Request, response : AHTTP::Response | Nil, firewall_name : String, previous_token : ASEC::Authentication::Token::Interface | Nil = nil)#
Methods#
#authenticated_token : ASEC::Authentication::Token::Interface#
Returns the token of the authenticated user.
#authenticator : ASEC::Authenticator::Interface#
Returns the authenticator that authenticated the user.
#firewall_name : String#
Returns the name of the firewall the user was authenticated on.
#passport : ASEC::Authenticator::Passport#
Returns the passport the user was authenticated with.
#previous_token : ASEC::Authentication::Token::Interface | ::Nil#
Returns the token that was set on the token storage before the user was authenticated, if any.
#response : AHTTP::Response | ::Nil#
The response to send, or nil to let the request continue.
#response=(response : AHTTP::Response | Nil)#
The response to send, or nil to let the request continue.