\OAuth2\ControllerTokenControllerInterface

This controller is called when a token is being requested.

it is called to handle all grant types the application supports. It also validates the client's credentials

Summary

Methods
Constants
handleTokenRequest()
grantAccessToken()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

handleTokenRequest()

handleTokenRequest(\OAuth2\RequestInterface  $request, \OAuth2\ResponseInterface  $response) 

Handle the token request

Parameters

\OAuth2\RequestInterface $request
  • The current http request
\OAuth2\ResponseInterface $response
  • An instance of OAuth2\ResponseInterface to contain the response data

grantAccessToken()

grantAccessToken(\OAuth2\RequestInterface  $request, \OAuth2\ResponseInterface  $response) : mixed

Grant or deny a requested access token.

This would be called from the "/token" endpoint as defined in the spec. You can call your endpoint whatever you want.

Parameters

\OAuth2\RequestInterface $request
  • Request object to grant access token
\OAuth2\ResponseInterface $response
  • Response object

Returns

mixed