메소드 |
설명 |
|
__call ( string $name, mixed $arguments ) : mixed |
Fakes the OAuth2.php vendor class extension for methods |
|
__construct ( ComponentCollection $collection, $settings = [] ) |
Constructor - Adds class associations |
|
__get ( string $name ) : mixed |
Fakes the OAuth2.php vendor class extension for variables |
|
allow ( $action = null ) : void |
Takes a list of actions in the current controller for which authentication is not required, or
no parameters to allow all actions. |
|
checkClientCredentials ( string $client_id, string $client_secret = null ) : mixed |
Check client details are valid |
|
checkRestrictedGrantType ( string $client_id, string $grant_type ) : boolean |
Partial implementation, just checks globally avaliable grant types |
|
checkUserCredentials ( type $client_id, type $username, type $password ) |
Grant type: user_credentials |
|
deny ( $action = null ) : void |
Removes items from the list of allowed/no authentication required actions. |
|
getAccessToken ( string $oauth_token ) : mixed |
Retrieve access token |
|
getAuthCode ( string $code ) : AuthCode |
Grant type: authorization_code |
|
getClientDetails ( string $client_id ) : boolean |
Get client details |
|
getRefreshToken ( string $refresh_token ) : mixed |
Grant type: refresh_token |
|
hash ( string $password ) : string |
Convenience function for hashing client_secret (or whatever else) |
|
initialize ( Controller $controller ) : void |
Initializes OAuthComponent for use in the controller |
|
invalidateUserTokens ( integer $user_id, string $tokens = 'both' ) |
Convenience function to invalidate all a users tokens, for example when they change their password |
|
isAuthorized ( ) : boolean |
Checks if user is valid using OAuth2-php library |
|
setAccessToken ( string $oauth_token, string $client_id, integer $user_id, string $expires, string $scope = null ) : boolean |
Set access token |
|
setAuthCode ( string $code, string $client_id, integer $user_id, string $redirect_uri, string $expires, string $scope = null ) : boolean |
Grant type: authorization_code |
|
setRefreshToken ( string $refresh_token, integer $client_id, string $user_id, string $expires, string $scope = null ) : boolean |
Grant type: refresh_token |
|
startup ( Controller $controller ) : boolean |
Main engine that checks valid access_token and stores the associated user for retrival |
|
unsetRefreshToken ( string $refresh_token ) : boolean |
Grant type: refresh_token |
|
user ( type $field = null, $token = null ) : mixed |
Gets the user associated to the current access token. |
|