Cheetah
|
Additional Inherited Members | |
![]() | |
const | RESPONSE_TYPE_AUTHORIZATION_CODE = 'code' |
const | RESPONSE_TYPE_ACCESS_TOKEN = 'token' |
Server class for OAuth2 This class serves as a convience class which wraps the other Controller classes
Definition at line 44 of file Server.php.
OAuth2\Server::__construct | ( | $storage = array() , |
|
array | $config = array() , |
||
array | $grantTypes = array() , |
||
array | $responseTypes = array() , |
||
TokenTypeInterface | $tokenType = null , |
||
ScopeInterface | $scopeUtil = null , |
||
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 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 |
Definition at line 101 of file Server.php.
OAuth2\Server::addGrantType | ( | GrantTypeInterface | $grantType, |
$identifier = null |
|||
) |
Definition at line 369 of file Server.php.
OAuth2\Server::addResponseType | ( | ResponseTypeInterface | $responseType, |
$key = null |
|||
) |
Definition at line 429 of file Server.php.
OAuth2\Server::addStorage | ( | $storage, | |
$key = null |
|||
) |
Set a storage object for the server
$storage | An object implementing one of the Storage interfaces |
$key | If null, the storage is set to the key of each storage interface it implements |
Definition at line 393 of file Server.php.
|
protected |
Definition at line 719 of file Server.php.
|
protected |
Definition at line 473 of file Server.php.
|
protected |
Definition at line 736 of file Server.php.
|
protected |
Definition at line 750 of file Server.php.
|
protected |
For Authorize and Token Controllers
Definition at line 698 of file Server.php.
|
protected |
For Resource Controller
Definition at line 682 of file Server.php.
|
protected |
Definition at line 526 of file Server.php.
|
protected |
Definition at line 497 of file Server.php.
|
protected |
Definition at line 546 of file Server.php.
OAuth2\Server::getAccessTokenData | ( | RequestInterface | $request, |
ResponseInterface | $response = null |
||
) |
Implements OAuth2\Controller\ResourceControllerInterface.
Definition at line 361 of file Server.php.
|
protected |
Definition at line 648 of file Server.php.
OAuth2\Server::getAuthorizeController | ( | ) |
Definition at line 145 of file Server.php.
OAuth2\Server::getClientAssertionType | ( | ) |
Definition at line 818 of file Server.php.
OAuth2\Server::getConfig | ( | $name, | |
$default = null |
|||
) |
Definition at line 828 of file Server.php.
|
protected |
Definition at line 612 of file Server.php.
|
protected |
Definition at line 577 of file Server.php.
|
protected |
Definition at line 570 of file Server.php.
OAuth2\Server::getGrantType | ( | $name | ) |
Definition at line 795 of file Server.php.
OAuth2\Server::getGrantTypes | ( | ) |
Definition at line 790 of file Server.php.
|
protected |
Definition at line 661 of file Server.php.
|
protected |
Definition at line 670 of file Server.php.
OAuth2\Server::getResourceController | ( | ) |
Definition at line 163 of file Server.php.
OAuth2\Server::getResponse | ( | ) |
Definition at line 775 of file Server.php.
OAuth2\Server::getResponseType | ( | $name | ) |
Definition at line 805 of file Server.php.
OAuth2\Server::getResponseTypes | ( | ) |
Definition at line 800 of file Server.php.
OAuth2\Server::getScopeUtil | ( | ) |
Definition at line 455 of file Server.php.
OAuth2\Server::getStorage | ( | $name | ) |
Definition at line 785 of file Server.php.
OAuth2\Server::getStorages | ( | ) |
Definition at line 780 of file Server.php.
OAuth2\Server::getTokenController | ( | ) |
Definition at line 154 of file Server.php.
OAuth2\Server::getTokenType | ( | ) |
Definition at line 813 of file Server.php.
OAuth2\Server::getUserInfoController | ( | ) |
Definition at line 172 of file Server.php.
OAuth2\Server::grantAccessToken | ( | RequestInterface | $request, |
ResponseInterface | $response = null |
||
) |
Implements OAuth2\Controller\TokenControllerInterface.
Definition at line 264 of file Server.php.
OAuth2\Server::handleAuthorizeRequest | ( | RequestInterface | $request, |
ResponseInterface | $response, | ||
$is_authorized, | |||
$user_id = null |
|||
) |
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.
$request | The request should have the follow parameters set in the querystring:
|
$is_authorized | TRUE or FALSE depending on whether the user authorized the access. |
$user_id | Identifier of user who authorized the client |
Implements OAuth2\Controller\AuthorizeControllerInterface.
Definition at line 318 of file Server.php.
OAuth2\Server::handleRevokeRequest | ( | RequestInterface | $request, |
ResponseInterface | $response = null |
||
) |
Handle a revoke token request This would be called from the "/revoke" endpoint as defined in the draft Token Revocation spec
RequestInterface | $request | |
ResponseInterface | $response |
Definition at line 282 of file Server.php.
OAuth2\Server::handleTokenRequest | ( | RequestInterface | $request, |
ResponseInterface | $response = null |
||
) |
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.
$request | - OAuth2\RequestInterface Request object to grant access token |
$response | - OAuth2\ResponseInterface Response object containing error messages (failure) or access token (success) |
InvalidArgumentException | |
LogicException |
Implements OAuth2\Controller\TokenControllerInterface.
Definition at line 256 of file Server.php.
OAuth2\Server::handleUserInfoRequest | ( | RequestInterface | $request, |
ResponseInterface | $response = null |
||
) |
Return claims about the authenticated end-user. This would be called from the "/UserInfo" endpoint as defined in the spec.
$request | - OAuth2\RequestInterface Request object to grant access token |
$response | - OAuth2\ResponseInterface Response object containing error messages (failure) or user claims (success) |
InvalidArgumentException | |
LogicException |
Implements OAuth2\OpenID\Controller\UserInfoControllerInterface.
Definition at line 228 of file Server.php.
|
protected |
Definition at line 763 of file Server.php.
OAuth2\Server::setAuthorizeController | ( | AuthorizeControllerInterface | $authorizeController | ) |
every getter deserves a setter
Definition at line 184 of file Server.php.
OAuth2\Server::setConfig | ( | $name, | |
$value | |||
) |
Definition at line 823 of file Server.php.
OAuth2\Server::setResourceController | ( | ResourceControllerInterface | $resourceController | ) |
every getter deserves a setter
Definition at line 200 of file Server.php.
OAuth2\Server::setScopeUtil | ( | $scopeUtil | ) |
every getter deserves a setter
Definition at line 468 of file Server.php.
OAuth2\Server::setTokenController | ( | TokenControllerInterface | $tokenController | ) |
every getter deserves a setter
Definition at line 192 of file Server.php.
OAuth2\Server::setUserInfoController | ( | UserInfoControllerInterface | $userInfoController | ) |
every getter deserves a setter
Definition at line 208 of file Server.php.
OAuth2\Server::validateAuthorizeRequest | ( | RequestInterface | $request, |
ResponseInterface | $response = null |
||
) |
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
Implements OAuth2\Controller\AuthorizeControllerInterface.
Definition at line 345 of file Server.php.
|
protected |
Definition at line 755 of file Server.php.
OAuth2\Server::verifyResourceRequest | ( | RequestInterface | $request, |
ResponseInterface | $response = null , |
||
$scope = null |
|||
) |
Implements OAuth2\Controller\ResourceControllerInterface.
Definition at line 353 of file Server.php.
|
protected |
Definition at line 55 of file Server.php.
|
protected |
Definition at line 65 of file Server.php.
|
protected |
Definition at line 51 of file Server.php.
|
protected |
Definition at line 61 of file Server.php.
|
protected |
Definition at line 57 of file Server.php.
|
protected |
Definition at line 50 of file Server.php.
|
protected |
Definition at line 80 of file Server.php.
|
protected |
Definition at line 62 of file Server.php.
|
protected |
Definition at line 64 of file Server.php.
|
protected |
Definition at line 67 of file Server.php.
|
protected |
Definition at line 52 of file Server.php.
|
protected |
Definition at line 56 of file Server.php.
|
protected |
Definition at line 63 of file Server.php.
|
protected |
Definition at line 58 of file Server.php.