SimplePrincipal
in package
implements
Principal
Read onlyYes
FinalYes
Tags
Table of Contents
Interfaces
Methods
- __construct() : mixed
- claims() : array<string, mixed>
- hasRole() : bool
- hasScope() : bool
- id() : string
- Stable identifier for the principal — used for logging, audit, MDC.
- roles() : array<int, string>
- scopes() : array<int, string>
Methods
__construct()
public
__construct(string $id[, array<int, string> $roles = [] ][, array<int, string> $scopes = [] ][, array<string, mixed> $claims = [] ]) : mixed
Parameters
- $id : string
- $roles : array<int, string> = []
- $scopes : array<int, string> = []
- $claims : array<string, mixed> = []
claims()
public
claims() : array<string, mixed>
Return values
array<string, mixed>hasRole()
public
hasRole(string $role) : bool
Parameters
- $role : string
Return values
boolhasScope()
public
hasScope(string $scope) : bool
Parameters
- $scope : string
Return values
boolid()
Stable identifier for the principal — used for logging, audit, MDC.
public
id() : string
Typically a user id, service account name, or "anonymous".
Return values
stringroles()
public
roles() : array<int, string>
Return values
array<int, string>scopes()
public
scopes() : array<int, string>