1 | <?php |
||
13 | class PersonalAccessGrant extends AbstractGrant |
||
14 | { |
||
15 | /** |
||
16 | * Respond to an access token request. |
||
17 | * |
||
18 | * @param ServerRequestInterface $request |
||
19 | * @param ResponseTypeInterface $responseType |
||
20 | * @param DateInterval $accessTokenTTL |
||
21 | * |
||
22 | * @throws OAuthServerException |
||
23 | * |
||
24 | * @return ResponseTypeInterface |
||
25 | */ |
||
26 | public function respondToAccessTokenRequest(ServerRequestInterface $request, ResponseTypeInterface $responseType, DateInterval $accessTokenTTL) |
||
49 | |||
50 | /** |
||
51 | * Validate the authorization code user. |
||
52 | * |
||
53 | * @param \Psr\Http\Message\ServerRequestInterface $request |
||
54 | * |
||
55 | * @throws \League\OAuth2\Server\Exception\OAuthServerException |
||
56 | */ |
||
57 | protected function validateUser(ServerRequestInterface $request) |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | public function getIdentifier() |
||
73 | } |
||
74 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: