1 | <?php namespace Limoncello\Passport\Authentication; |
||
25 | class PassportAccount implements PassportAccountInterface |
||
26 | { |
||
27 | /** |
||
28 | * @var array |
||
29 | */ |
||
30 | private $properties; |
||
31 | |||
32 | /** |
||
33 | * @var DatabaseSchemaInterface |
||
34 | */ |
||
35 | private $schema; |
||
36 | |||
37 | /** |
||
38 | * @var bool|string |
||
39 | */ |
||
40 | private $userIdentityKey = false; |
||
41 | |||
42 | /** |
||
43 | * @var bool|string |
||
44 | */ |
||
45 | private $clientIdentityKey = false; |
||
46 | |||
47 | /** |
||
48 | * @var bool|string |
||
49 | */ |
||
50 | private $scopesKey = false; |
||
51 | |||
52 | /** |
||
53 | * @param DatabaseSchemaInterface $schema |
||
54 | * @param array $properties |
||
55 | */ |
||
56 | 2 | public function __construct(DatabaseSchemaInterface $schema, array $properties = []) |
|
61 | |||
62 | /** |
||
63 | * @inheritdoc |
||
64 | */ |
||
65 | 2 | public function setPassportProperties(array $properties): PassportAccountInterface |
|
71 | |||
72 | /** |
||
73 | * @inheritdoc |
||
74 | */ |
||
75 | 1 | public function hasProperty($key): bool |
|
81 | |||
82 | /** |
||
83 | * @inheritdoc |
||
84 | */ |
||
85 | 1 | public function getProperty($key) |
|
93 | |||
94 | /** |
||
95 | * @inheritdoc |
||
96 | */ |
||
97 | 1 | public function hasUserIdentity(): bool |
|
101 | |||
102 | /** |
||
103 | * @inheritdoc |
||
104 | */ |
||
105 | 1 | public function getUserIdentity() |
|
109 | |||
110 | /** |
||
111 | * @inheritdoc |
||
112 | */ |
||
113 | 1 | public function hasClientIdentity(): bool |
|
117 | |||
118 | /** |
||
119 | * @inheritdoc |
||
120 | */ |
||
121 | 1 | public function getClientIdentity() |
|
125 | |||
126 | /** |
||
127 | * @inheritdoc |
||
128 | */ |
||
129 | 1 | public function hasScopes(): bool |
|
133 | |||
134 | /** |
||
135 | * @inheritdoc |
||
136 | */ |
||
137 | 1 | public function getScopes(): array |
|
141 | |||
142 | /** |
||
143 | * @inheritdoc |
||
144 | */ |
||
145 | 1 | public function hasScope(string $scope): bool |
|
149 | |||
150 | /** |
||
151 | * @return string |
||
152 | */ |
||
153 | 1 | protected function getUserIdentityKey(): string |
|
161 | |||
162 | /** |
||
163 | * @return string |
||
164 | */ |
||
165 | 1 | protected function getClientIdentityKey(): string |
|
173 | |||
174 | /** |
||
175 | * @return string |
||
176 | */ |
||
177 | 1 | protected function getScopesKey(): string |
|
185 | |||
186 | /** |
||
187 | * @return DatabaseSchemaInterface |
||
188 | */ |
||
189 | 1 | protected function getSchema(): DatabaseSchemaInterface |
|
193 | } |
||
194 |