trait SecurityTrait

Security trait.

Methods

string
encodePassword(UserInterface $user, string $password)

Encodes the raw password.

bool
isGranted(mixed $attributes, mixed $object = null)

Checks if the attributes are granted against the current authentication token and optionally supplied object.

Details

at line 34
string encodePassword(UserInterface $user, string $password)

Encodes the raw password.

Parameters

UserInterface $user A UserInterface instance
string $password The password to encode

Return Value

string The encoded password

Exceptions

RuntimeException when no password encoder could be found for the user

at line 49
bool isGranted(mixed $attributes, mixed $object = null)

Checks if the attributes are granted against the current authentication token and optionally supplied object.

Parameters

mixed $attributes
mixed $object

Return Value

bool

Exceptions

AuthenticationCredentialsNotFoundException when the token storage has no authentication token.