\OAuth2\StorageJwtBearerInterface

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

Summary

Methods
Constants
getClientKey()
getJti()
setJti()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

getClientKey()

getClientKey(  $client_id,   $subject) : STRING

Get the public key associated with a client_id

Parameters

$client_id

Client identifier to be checked with.

$subject

Returns

STRING —

Return the public key for the client_id if it exists, and MUST return FALSE if it doesn't.

getJti()

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

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

Parameters

$client_id

Client identifier to match.

$subject

The subject to match.

$audience

The audience to match.

$expiration

The expiration of the jti.

$jti

The jti to match.

Returns

\OAuth2\Storage\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.

setJti()

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

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

Parameters

$client_id

Client identifier to insert.

$subject

The subject to insert.

$audience

The audience to insert.

$expiration

The expiration of the jti.

$jti

The jti to insert.