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

Public Member Functions

 getClientDetails ($client_id)
 
 getClientScope ($client_id)
 
 checkRestrictedGrantType ($client_id, $grant_type)
 

Detailed Description

Implement this interface to specify where the OAuth2 Server should retrieve client information

Author
Brent Shaffer <bshafs at gmail dot com>

Definition at line 11 of file ClientInterface.php.

Member Function Documentation

◆ checkRestrictedGrantType()

OAuth2\Storage\ClientInterface::checkRestrictedGrantType (   $client_id,
  $grant_type 
)

Check restricted grant types of corresponding client identifier.

If you want to restrict clients to certain grant types, override this function.

Parameters
$client_idClient identifier to be check with.
$grant_typeGrant type to be check with
Returns
TRUE if the grant type is supported by this client identifier, and FALSE if it isn't.

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

◆ getClientDetails()

OAuth2\Storage\ClientInterface::getClientDetails (   $client_id)

Get client details corresponding client_id.

OAuth says we should store request URIs for each registered client. Implement this function to grab the stored URI for a given client id.

Parameters
$client_idClient identifier to be check with.
Returns
array Client details. The only mandatory key in the array is "redirect_uri". This function MUST return FALSE if the given client does not exist or is invalid. "redirect_uri" can be space-delimited to allow for multiple valid uris. return array( "redirect_uri" => REDIRECT_URI, // REQUIRED redirect_uri registered for the client "client_id" => CLIENT_ID, // OPTIONAL the client id "grant_types" => GRANT_TYPES, // OPTIONAL an array of restricted grant types "user_id" => USER_ID, // OPTIONAL the user identifier associated with this client "scope" => SCOPE, // OPTIONAL the scopes allowed for this client );

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

◆ getClientScope()

OAuth2\Storage\ClientInterface::getClientScope (   $client_id)

Get the scope associated with this client

Returns
STRING the space-delineated scope list for the specified client_id

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: