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

Public Member Functions

 getClientKey ($client_id, $subject)
 
 getJti ($client_id, $subject, $audience, $expiration, $jti)
 
 setJti ($client_id, $subject, $audience, $expiration, $jti)
 

Detailed Description

Implement this interface to specify where the OAuth2 Server should get the JWT key for clients

@TODO consider extending ClientInterface, as this will almost always be the same storage as retrieving clientData

Author
F21
Brent Shaffer <bshafs at gmail dot com>

Definition at line 15 of file JwtBearerInterface.php.

Member Function Documentation

◆ getClientKey()

OAuth2\Storage\JwtBearerInterface::getClientKey (   $client_id,
  $subject 
)

Get the public key associated with a client_id

Parameters
$client_idClient identifier to be checked with.
Returns
STRING Return the public key for the client_id if it exists, and MUST return FALSE if it doesn'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.

◆ getJti()

OAuth2\Storage\JwtBearerInterface::getJti (   $client_id,
  $subject,
  $audience,
  $expiration,
  $jti 
)

Get a jti (JSON token identifier) by matching against the client_id, subject, audience and expiration.

Parameters
$client_idClient identifier to match.
$subjectThe subject to match.
$audienceThe audience to match.
$expirationThe expiration of the jti.
$jtiThe jti to match.
Returns
An associative array as below, and return NULL if the jti does not exist.
  • issuer: Stored client identifier.
  • subject: Stored subject.
  • audience: Stored audience.
  • expires: Stored expiration in unix timestamp.
  • jti: The stored jti.

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

◆ setJti()

OAuth2\Storage\JwtBearerInterface::setJti (   $client_id,
  $subject,
  $audience,
  $expiration,
  $jti 
)

Store a used jti so that we can check against it to prevent replay attacks.

Parameters
$client_idClient identifier to insert.
$subjectThe subject to insert.
$audienceThe audience to insert.
$expirationThe expiration of the jti.
$jtiThe jti to insert.

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


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