Skip to content

class Athena::Security::Events::LoginFailure
inherits Athena::Contracts::EventDispatcher::Event #

Emitted when a user could not be authenticated, e.g. to throttle login attempts.

Listeners may replace the response the authenticator returned.

Constructors#

.new(exception : ASEC::Exception::Authentication, authenticator : ASEC::Authenticator::Interface, request : AHTTP::Request, response : AHTTP::Response | Nil, firewall_name : String, passport : ASEC::Authenticator::Passport | Nil = nil)#

View source

Methods#

#authenticator : ASEC::Authenticator::Interface#

Returns the authenticator that failed to authenticate the user.

View source

#exception : ASEC::Exception::Authentication#

Returns the exception that prevented authenticating the user.

View source

#firewall_name : String#

Returns the name of the firewall the user tried to authenticate on.

View source

#passport : ASEC::Authenticator::Passport | ::Nil#

Returns the passport the authenticator created, or nil if it failed before creating one.

View source

#request : AHTTP::Request#

Returns the request the user tried to authenticate 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