1 | <?php |
||
23 | class KeycloakRoles |
||
24 | { |
||
25 | |||
26 | /** |
||
27 | * @var array a list of roles associated with the realm |
||
28 | */ |
||
29 | protected $realmAccess = []; |
||
30 | /** |
||
31 | * @var array An associative array of KeycloakResourceRoles keyed by resource name |
||
32 | */ |
||
33 | protected $resourcesAndRoles = []; |
||
34 | |||
35 | /** |
||
36 | * KeycloakRoles constructor. |
||
37 | * |
||
38 | * @param $obj Object from JWT::decode |
||
39 | * |
||
40 | */ |
||
41 | 6 | public function __construct($obj) |
|
57 | |||
58 | public function hasResourceNamed($name) |
||
62 | |||
63 | 6 | public function getResourceNamesFound() |
|
67 | |||
68 | public function hasRealmRoleNamed($name) |
||
72 | |||
73 | 6 | public function getRealmRoles() |
|
77 | |||
78 | /** |
||
79 | * @param $name |
||
80 | * @return KeyCloakResourceRoles |
||
81 | */ |
||
82 | 2 | public function getRolesOfResourceNamed($name) |
|
86 | } |
||
87 |