Skip to content

class Athena::Security::Exception::Authentication
inherits RuntimeError #

The base type of exceptions raised when a user could not be authenticated.

The #message of these exceptions may contain sensitive information, such as whether a user exists, so it must not be shown to users. Show the #message_key instead, optionally interpolating its #message_data, e.g. via a translator.

Included modules

Athena::Security::Exception

Direct known subclasses

Athena::Security::Exception::AccountStatus Athena::Security::Exception::AuthenticationService Athena::Security::Exception::CustomUserMessageAuthentication Athena::Security::Exception::UserNotFound

Methods#

#message_data : Hash(String, String)#

Returns the data to interpolate into the #message_key.

View source

#message_key : String#

Returns a message describing why the user could not be authenticated, which is safe to show to users.

View source

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

The token of the authentication that failed, if any.

View source

#token=(token : ASEC::Authentication::Token::Interface | Nil)#

The token of the authentication that failed, if any.

View source