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

__construct(ContainerInterface $container)

Parameters

ContainerInterface $container

UserInterface|null getUser()

Return Value

UserInterface|null

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

TokenInterface|null getToken()

Return Value

TokenInterface|null