Security
in package
implements
AuthorizationCheckerInterface
Helper class for commonly-needed security tasks.
Tags
Table of Contents
Interfaces
- AuthorizationCheckerInterface
- The AuthorizationCheckerInterface.
Constants
- ACCESS_DENIED_ERROR = '_security.403_error'
- AUTHENTICATION_ERROR = '_security.last_error'
- LAST_USERNAME = '_security.last_username'
- MAX_USERNAME_LENGTH = 4096
Properties
- $container : mixed
Methods
- __construct() : mixed
- getToken() : TokenInterface|null
- getUser() : UserInterface|null
- isGranted() : bool
- Checks if the attributes are granted against the current authentication token and optionally supplied subject.
Constants
ACCESS_DENIED_ERROR
public
mixed
ACCESS_DENIED_ERROR
= '_security.403_error'
AUTHENTICATION_ERROR
public
mixed
AUTHENTICATION_ERROR
= '_security.last_error'
LAST_USERNAME
public
mixed
LAST_USERNAME
= '_security.last_username'
MAX_USERNAME_LENGTH
public
mixed
MAX_USERNAME_LENGTH
= 4096
Properties
$container
private
mixed
$container
Methods
__construct()
public
__construct(ContainerInterface $container) : mixed
Parameters
- $container : ContainerInterface
getToken()
public
getToken() : TokenInterface|null
Return values
TokenInterface|nullgetUser()
public
getUser() : UserInterface|null
Return values
UserInterface|nullisGranted()
Checks if the attributes are granted against the current authentication token and optionally supplied subject.
public
isGranted(mixed $attributes[, mixed $subject = null ]) : bool
Parameters
- $attributes : mixed
- $subject : mixed = null