Property | Type | Description | |
---|---|---|---|
$_provider | League\OAuth2\Client\Provider\AbstractProvider | Instance of OAuth2 provider. |
Method | Description | |
---|---|---|
__construct ( Cake\Controller\ComponentRegistry $registry, array $config = [] ) | Constructor | |
authenticate ( Cake\Network\Request $request, |
Get a user based on information in the request. | |
getUser ( Cake\Network\Request $request ) : mixed | Get a user based on information in the request. | |
normalizeConfig ( array $config ) : array | Normalizes providers' configuration. | |
provider ( Cake\Network\Request $request ) : League\Oauth2\Client\Provider\GenericProvider | false | Returns the $request-ed provider. | |
unauthenticated ( Cake\Network\Request $request, |
Handles unauthenticated access attempts. Will automatically forward to the requested provider's authorization URL to let the user grant access to the application. |
Method | Description | |
---|---|---|
_authenticate ( Cake\Network\Request $request ) : array | boolean | Authenticates with OAuth2 provider by getting an access token and retrieving the authorized user's profile data. | |
_getController ( ) : |
Get the controller associated with the collection. | |
_getProvider ( string $alias ) : League\Oauth2\Client\Provider\GenericProvider | Instantiates provider object. | |
_getProviderName ( Cake\Network\Request $request = null ) : mixed | Get the provider name based on the request or on the provider set. | |
_map ( array $data ) : array | Maps raw provider's user profile data to local user's data schema. | |
_mapUser ( string $provider, array $data ) : mixed | Get the provider name based on the request or on the provider set. | |
_normalizeConfig ( array &$config, string $alias, array $parent ) : void | Callback to loop through config values. | |
_socialLogin ( mixed $data ) : mixed | ||
_touch ( array $data ) : array | boolean | mixed | Find or create local user | |
_validate ( Cake\Network\Request $request ) : boolean | Validates OAuth2 request. | |
_validateConfig ( mixed &$value, string $key ) : void | Validates the configuration. |
public __construct ( Cake\Controller\ComponentRegistry $registry, array $config = [] ) | ||
$registry | Cake\Controller\ComponentRegistry | The Component registry used on this request. |
$config | array | Array of config to use. |
protected _authenticate ( Cake\Network\Request $request ) : array | boolean | ||
$request | Cake\Network\Request | Request object. |
return | array | boolean |
protected _getController ( ) : |
||
return | Controller instance |
protected _getProvider ( string $alias ) : League\Oauth2\Client\Provider\GenericProvider | ||
$alias | string | of the provider. |
return | League\Oauth2\Client\Provider\GenericProvider |
protected _getProviderName ( Cake\Network\Request $request = null ) : mixed | ||
$request | Cake\Network\Request | Request object. |
return | mixed | Either false or an array of user information |
protected _socialLogin ( mixed $data ) : mixed | ||
$data | mixed | data |
return | mixed |
public authenticate ( Cake\Network\Request $request, |
||
$request | Cake\Network\Request | Request object. |
$response | Response object. | |
return | boolean |
public normalizeConfig ( array $config ) : array | ||
$config | array | Array of config to normalize. |
return | array |
public provider ( Cake\Network\Request $request ) : League\Oauth2\Client\Provider\GenericProvider | false | ||
$request | Cake\Network\Request | Current HTTP request. |
return | League\Oauth2\Client\Provider\GenericProvider | false |
public unauthenticated ( Cake\Network\Request $request, |
||
$request | Cake\Network\Request | Request object. |
$response | Response object. | |
return |