PermissionsHashGenerator
class PermissionsHashGenerator implements PermissionsHashGeneratorInterface (View source)
Generates and caches the permissions hash for a user.
Properties
| protected PrivateKey | $privateKey | The private key service. |
|
| protected CacheBackendInterface | $cache | The cache backend interface to use for the persistent cache. |
|
| protected CacheBackendInterface | $static | The cache backend interface to use for the static cache. |
Methods
__construct(PrivateKey $private_key, CacheBackendInterface $cache, CacheBackendInterface $static)
Constructs a PermissionsHashGenerator object.
string
string
doGenerate(array $roles)
Generates a hash that uniquely identifies the user's permissions.
string
hash(string $identifier)
Hashes the given string.
Details
__construct(PrivateKey $private_key, CacheBackendInterface $cache, CacheBackendInterface $static)
Constructs a PermissionsHashGenerator object.
string
generate(AccountInterface $account)
Generates a hash that uniquely identifies a user's permissions.
protected string
doGenerate(array $roles)
Generates a hash that uniquely identifies the user's permissions.
protected string
hash(string $identifier)
Hashes the given string.