\OAuth2\StorageUserCredentialsInterface

Implement this interface to specify where the OAuth2 Server should retrieve user credentials for the "Resource Owner Password Credentials" grant type

Summary

Methods
Constants
checkUserCredentials()
getUserDetails()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

checkUserCredentials()

checkUserCredentials(  $username,   $password) : TRUE

Grant access tokens for basic user credentials.

Check the supplied username and password for validity.

You can also use the $client_id param to do any checks required based on a client, if you need that.

Required for OAuth2::GRANT_TYPE_USER_CREDENTIALS.

Parameters

$username

Username to be check with.

$password

Password to be check with.

Returns

TRUE —

if the username and password are valid, and FALSE if it isn't. Moreover, if the username and password are valid, and you want to

getUserDetails()

getUserDetails(string  $username) : array|false

Parameters

string $username
  • username to get details for

Returns

array|false —
  • the associated "user_id" and optional "scope" values This function MUST return FALSE if the requested user does not exist or is invalid. "scope" is a space-separated list of restricted scopes.