Cheetah
Public Member Functions | List of all members
OAuth2\Storage\UserCredentialsInterface Interface Reference
Inheritance diagram for OAuth2\Storage\UserCredentialsInterface:
OAuth2\Storage\Cassandra OAuth2\Storage\CouchbaseDB OAuth2\Storage\DynamoDB OAuth2\Storage\Memory OAuth2\Storage\Mongo OAuth2\Storage\Pdo OAuth2\Storage\Redis

Public Member Functions

 checkUserCredentials ($username, $password)
 
 getUserDetails ($username)
 

Detailed Description

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

Author
Brent Shaffer <bshafs at gmail dot com>

Definition at line 12 of file UserCredentialsInterface.php.

Member Function Documentation

◆ checkUserCredentials()

OAuth2\Storage\UserCredentialsInterface::checkUserCredentials (   $username,
  $password 
)

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
$usernameUsername to be check with.
$passwordPassword 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
See also
http://tools.ietf.org/html/rfc6749#section-4.3

Implemented in OAuth2\Storage\Redis, OAuth2\Storage\Pdo, OAuth2\Storage\Mongo, OAuth2\Storage\Memory, OAuth2\Storage\DynamoDB, OAuth2\Storage\CouchbaseDB, and OAuth2\Storage\Cassandra.

◆ getUserDetails()

OAuth2\Storage\UserCredentialsInterface::getUserDetails (   $username)
Returns
ARRAY 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.
return array(
"user_id" => USER_ID, // REQUIRED user_id to be stored with the authorization code or access token
"scope" => SCOPE // OPTIONAL space-separated list of restricted scopes
);

Implemented in OAuth2\Storage\Redis, OAuth2\Storage\Pdo, OAuth2\Storage\Mongo, OAuth2\Storage\Memory, OAuth2\Storage\DynamoDB, OAuth2\Storage\CouchbaseDB, and OAuth2\Storage\Cassandra.


The documentation for this interface was generated from the following file: