Skip to content

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)#

View source

Methods#

#authenticated_token : ASEC::Authentication::Token::Interface#

Returns the token of the authenticated user.

View source

#authenticator : ASEC::Authenticator::Interface#

Returns the authenticator that authenticated the user.

View source

#firewall_name : String#

Returns the name of the firewall the user was authenticated on.

View source

#passport : ASEC::Authenticator::Passport#

Returns the passport the user was authenticated with.

View source

#previous_token : ASEC::Authentication::Token::Interface | ::Nil#

Returns the token that was set on the token storage before the user was authenticated, if any.

View source

#request : AHTTP::Request#

Returns the request the user was authenticated with.

View source

#response : AHTTP::Response | ::Nil#

The response to send, or nil to let the request continue.

View source

#response=(response : AHTTP::Response | Nil)#

The response to send, or nil to let the request continue.

View source

#user : ASEC::User::Interface#

Returns the authenticated user.

View source