Class OAuth2Authenticate
Authenticate users via OAuth2 providers.
-
Cake\Auth\BaseAuthenticate
-
BEdita\API\Auth\OAuth2Authenticate
Methods summary
public
|
#
authenticate( Cake\Http\ServerRequest $request, Cake\Http\Response $response )
|
public
|
#
getUser( Cake\Http\ServerRequest $request )
|
protected
array
|
#
getOAuth2Response( string $url, string $accessToken )
Get response from an OAuth2 provider
Get response from an OAuth2 provider
Parameters
- $url
- OAuth2 provider URL
- $accessToken
- Access token to use in request
Returns
array Response from an OAuth2 provider
Codecoverageignore
|
public
|
#
unauthenticated( Cake\Http\ServerRequest $request, Cake\Http\Response $response )
|
Properties summary
protected
array
|
$_defaultConfig
Default config for this object.
Default config for this object.
authProviders The AuthProviders entities associated to this authentication component.
Array formatted with auth_providers.name as key, from AuthProvidersTable::findAuthenticate()
fields The fields to use to identify a user by.
userModel The alias for users table, defaults to Users.
finder The finder method to use to fetch user record. Defaults to 'all'.
You can set finder name as string or an array where key is finder name and value
is an array passed to Table::find() options.
E.g. ['finderName' => ['some_finder_option' => 'some_value']]
passwordHasher Password hasher class. Can be a string specifying class name
or an array containing className key, any other keys will be passed as
config to the class. Defaults to 'Default'.
- Options
scope and contain have been deprecated since 3.1. Use custom
finder instead to modify the query to fetch user record.
|
#
[
'authProviders' => [],
'userModel' => 'Users',
'fields' => [
'username' => 'ExternalAuth.provider_username',
'password' => null,
],
'finder' => null,
'passwordHasher' => 'Default',
]
|