class Security

Helper class for commonly-needed security tasks.

Constants

ACCESS_DENIED_ERROR

AUTHENTICATION_ERROR

LAST_USERNAME

MAX_USERNAME_LENGTH

Methods

__construct(ContainerInterface $container)

No description

getUser()

No description

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

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

getToken()

No description

Details

at line 32
__construct(ContainerInterface $container)

Parameters

ContainerInterface $container

at line 40
UserInterface|null getUser()

Return Value

UserInterface|null

at line 62
bool isGranted(mixed $attributes, mixed $subject = null)

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

Parameters

mixed $attributes
mixed $subject

Return Value

bool

at line 71
TokenInterface|null getToken()

Return Value

TokenInterface|null