| 1 | <?php |
||
| 14 | final class Token implements RouteCallbackInterface |
||
| 15 | { |
||
| 16 | const ROUTE = '/token'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * The OAuth2 server instance. |
||
| 20 | * |
||
| 21 | * @var OAuth2\Server |
||
| 22 | */ |
||
| 23 | private $server; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Create a new instance of the Token route. |
||
| 27 | * |
||
| 28 | * @param OAuth2\Server $server The oauth2 server imstance. |
||
| 29 | */ |
||
| 30 | public function __construct(OAuth2\Server $server) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Invoke this route callback. |
||
| 37 | * |
||
| 38 | * @param ServerRequestInterface $request Represents the current HTTP request. |
||
| 39 | * @param ResponseInterface $response Represents the current HTTP response. |
||
| 40 | * @param array $arguments Values for the current route’s named placeholders. |
||
| 41 | * |
||
| 42 | * @return RequestInterface |
||
| 43 | */ |
||
| 44 | public function __invoke(ServerRequestInterface $request, ResponseInterface $response, array $arguments = []) |
||
| 56 | } |
||
| 57 |