Skip to content

class Athena::Security::Authorization::Voter::Authenticated
inherits Athena::Security::Authorization::Voter #

Votes on attributes describing how the user authenticated:

Included modules

Athena::Security::Authorization::Voter::AttributeOnly

Constants#

IS_AUTHENTICATED = "IS_AUTHENTICATED"#

IS_AUTHENTICATED_FULLY = "IS_AUTHENTICATED_FULLY"#

PUBLIC_ACCESS = "PUBLIC_ACCESS"#

Constructors#

.new(authentication_trust_resolver : ASEC::Authentication::TrustResolverInterface)#

View source

Methods#

#supports_attribute?(attribute : String) : Bool#

Returns false if this voter never votes on the provided attribute, otherwise true.

The ASEC::Authorization::AccessDecisionManager caches the result, and no longer asks this voter to vote on the attribute when it is false.

View source

#vote(token : ASEC::Authentication::Token::Interface, attribute : String, vote : ASEC::Authorization::Voter::Vote | Nil = nil) : ASEC::Authorization::Voter::Access#

Returns the vote of this voter on whether the provided token is granted the provided attribute.

The vote may be explained by adding reasons to the provided vote.

View source