$response
$response : \OAuth2\ResponseInterface
Server class for OAuth2 This class serves as a convience class which wraps the other Controller classes
$response : \OAuth2\ResponseInterface
$authorizeController : \OAuth2\Controller\AuthorizeControllerInterface
$tokenController : \OAuth2\Controller\TokenControllerInterface
$resourceController : \OAuth2\Controller\ResourceControllerInterface
$userInfoController : \OAuth2\OpenID\Controller\UserInfoControllerInterface
$tokenType : \OAuth2\TokenType\TokenTypeInterface
$scopeUtil : \OAuth2\ScopeInterface
$clientAssertionType : \OAuth2\ClientAssertionType\ClientAssertionTypeInterface
__construct(mixed $storage = array(), array $config = array(), array $grantTypes = array(), array $responseTypes = array(), \OAuth2\TokenType\TokenTypeInterface $tokenType = null, \OAuth2\ScopeInterface $scopeUtil = null, \OAuth2\ClientAssertionType\ClientAssertionTypeInterface $clientAssertionType = null)
| mixed | $storage | (array or OAuth2\Storage) - single object or array of objects implementing the required storage types (ClientCredentialsInterface and AccessTokenInterface as a minimum) |
| array | $config | specify a different token lifetime, token header name, etc |
| array | $grantTypes | An array of OAuth2\GrantType\GrantTypeInterface to use for granting access tokens |
| array | $responseTypes | Response types to use. array keys should be "code" and "token" for Access Token and Authorization Code response types |
| \OAuth2\TokenType\TokenTypeInterface | $tokenType | The token type object to use. Valid token types are "bearer" and "mac" |
| \OAuth2\ScopeInterface | $scopeUtil | The scope utility class to use to validate scope |
| \OAuth2\ClientAssertionType\ClientAssertionTypeInterface | $clientAssertionType | The method in which to verify the client identity. Default is HttpBasic |
getAuthorizeController() : \OAuth2\Controller\AuthorizeControllerInterface
getTokenController() : \OAuth2\Controller\TokenController
getResourceController() : \OAuth2\Controller\ResourceControllerInterface
getUserInfoController() : \OAuth2\OpenID\Controller\UserInfoControllerInterface
setAuthorizeController(\OAuth2\Controller\AuthorizeControllerInterface $authorizeController)
| \OAuth2\Controller\AuthorizeControllerInterface | $authorizeController |
setTokenController(\OAuth2\Controller\TokenControllerInterface $tokenController)
| \OAuth2\Controller\TokenControllerInterface | $tokenController |
setResourceController(\OAuth2\Controller\ResourceControllerInterface $resourceController)
| \OAuth2\Controller\ResourceControllerInterface | $resourceController |
setUserInfoController(\OAuth2\OpenID\Controller\UserInfoControllerInterface $userInfoController)
| \OAuth2\OpenID\Controller\UserInfoControllerInterface | $userInfoController |
handleUserInfoRequest(\OAuth2\RequestInterface $request, \OAuth2\ResponseInterface $response = null) : \OAuth2\ResponseInterface
Return claims about the authenticated end-user.
This would be called from the "/UserInfo" endpoint as defined in the spec.
| \OAuth2\RequestInterface | $request |
|
| \OAuth2\ResponseInterface | $response |
|
handleTokenRequest(\OAuth2\RequestInterface $request, \OAuth2\ResponseInterface $response = null) : \OAuth2\ResponseInterface
Grant or deny a requested access token.
This would be called from the "/token" endpoint as defined in the spec. Obviously, you can call your endpoint whatever you want.
| \OAuth2\RequestInterface | $request |
|
| \OAuth2\ResponseInterface | $response |
|
grantAccessToken(\OAuth2\RequestInterface $request, \OAuth2\ResponseInterface $response = null) : 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.
| \OAuth2\RequestInterface | $request |
|
| \OAuth2\ResponseInterface | $response |
|
handleRevokeRequest(\OAuth2\RequestInterface $request, \OAuth2\ResponseInterface $response = null) : \OAuth2\Response|\OAuth2\ResponseInterface
Handle a revoke token request This would be called from the "/revoke" endpoint as defined in the draft Token Revocation spec
| \OAuth2\RequestInterface | $request | |
| \OAuth2\ResponseInterface | $response |
handleAuthorizeRequest(\OAuth2\RequestInterface $request, \OAuth2\ResponseInterface $response, boolean $is_authorized, mixed $user_id = null) : \OAuth2\ResponseInterface
Redirect the user appropriately after approval.
After the user has approved or denied the resource request the authorization server should call this function to redirect the user appropriately.
| \OAuth2\RequestInterface | $request |
|
| \OAuth2\ResponseInterface | $response |
|
| boolean | $is_authorized |
|
| mixed | $user_id |
|
validateAuthorizeRequest(\OAuth2\RequestInterface $request, \OAuth2\ResponseInterface $response = null) : boolean
Pull the authorization request data out of the HTTP request.
The draft specifies that the parameters should be retrieved from GET, override the Response object to change this
| \OAuth2\RequestInterface | $request |
|
| \OAuth2\ResponseInterface | $response |
|
The authorization parameters so the authorization server can prompt the user for approval if valid.
verifyResourceRequest(\OAuth2\RequestInterface $request, \OAuth2\ResponseInterface $response = null, string $scope = null) : mixed
Verify the resource request
| \OAuth2\RequestInterface | $request |
|
| \OAuth2\ResponseInterface | $response |
|
| string | $scope |
|
getAccessTokenData(\OAuth2\RequestInterface $request, \OAuth2\ResponseInterface $response = null) : mixed
Get access token data.
| \OAuth2\RequestInterface | $request |
|
| \OAuth2\ResponseInterface | $response |
|
addGrantType(\OAuth2\GrantType\GrantTypeInterface $grantType, mixed $identifier = null)
| \OAuth2\GrantType\GrantTypeInterface | $grantType | |
| mixed | $identifier |
addResponseType(\OAuth2\ResponseType\ResponseTypeInterface $responseType, mixed $key = null)
| \OAuth2\ResponseType\ResponseTypeInterface | $responseType | |
| mixed | $key |
getScopeUtil() : \OAuth2\ScopeInterface
setScopeUtil(\OAuth2\ScopeInterface $scopeUtil)
| \OAuth2\ScopeInterface | $scopeUtil |
getTokenType() : \OAuth2\TokenType\TokenTypeInterface
getClientAssertionType() : \OAuth2\ClientAssertionType\ClientAssertionTypeInterface
createDefaultAuthorizeController() : \OAuth2\Controller\AuthorizeControllerInterface
createDefaultTokenController() : \OAuth2\Controller\TokenControllerInterface
createDefaultResourceController() : \OAuth2\Controller\ResourceControllerInterface
createDefaultUserInfoController() : \OAuth2\OpenID\Controller\UserInfoControllerInterface
getDefaultTokenType() : \OAuth2\TokenType\Bearer
getAccessTokenResponseType() : \OAuth2\ResponseType\AccessToken
getIdTokenResponseType() : \OAuth2\OpenID\ResponseType\IdToken
getIdTokenTokenResponseType() : \OAuth2\OpenID\ResponseType\IdTokenToken
createDefaultJwtAccessTokenStorage() : \OAuth2\Storage\JwtAccessToken
For Resource Controller
createDefaultJwtAccessTokenResponseType() : \OAuth2\ResponseType\JwtAccessToken
For Authorize and Token Controllers
createDefaultAccessTokenResponseType() : \OAuth2\ResponseType\AccessToken
createDefaultIdTokenResponseType() : \OAuth2\OpenID\ResponseType\IdToken
createDefaultIdTokenTokenResponseType() : \OAuth2\OpenID\ResponseType\IdTokenToken