1 | <?php |
||
8 | class AuthorizationServerConfigurationBuilder |
||
9 | { |
||
10 | private $defaultOptions = [ |
||
11 | 'access_token_generator' => null, |
||
12 | 'always_require_a_client' => false, |
||
13 | 'access_token_length' => 32, |
||
14 | 'access_token_ttl' => 3600, |
||
15 | 'always_generate_a_refresh_token' => false, |
||
16 | 'revoke_refresh_token_when_used' => true, |
||
17 | ]; |
||
18 | |||
19 | private $options = [ |
||
20 | 'access_token_generator' => null, |
||
21 | 'always_require_a_client' => false, |
||
22 | 'access_token_length' => 32, |
||
23 | 'access_token_ttl' => 3600, |
||
24 | 'always_generate_a_refresh_token' => false, |
||
25 | 'revoke_refresh_token_when_used' => true, |
||
26 | ]; |
||
27 | |||
28 | private $built = false; |
||
29 | |||
30 | private $configuration; |
||
31 | |||
32 | public function __construct() |
||
35 | |||
36 | public function alwaysRequireAClient($flag) |
||
42 | |||
43 | public function shouldRevokeRefreshTokenWhenUsed($flag) |
||
49 | |||
50 | public function alwaysGenerateARefreshToken($flag) |
||
56 | |||
57 | public function setAccessTokenTTL($ttlInSeconds) |
||
64 | |||
65 | public function setAccessTokenGenerator($accessTokenGenerator) |
||
71 | |||
72 | public function build() |
||
101 | |||
102 | public function reset() |
||
108 | |||
109 | public function getAuthorizationServerConfiguration() |
||
118 | } |
||
119 |