AccessToken
in package
implements
AccessTokenEntityInterface
uses
Rfc9068AccessTokenTrait, EntityTrait, TokenEntityTrait
OAuth2 Access Token (Protocol layer) RFC 9068 準拠のアクセストークンを生成
Table of Contents
Interfaces
- AccessTokenEntityInterface
Properties
- $jwtConfiguration : Configuration
- $privateKey : CryptKey
Methods
- __toString() : mixed
- Generate a string representation from the access token
- addScope() : void
- Add Scope
- getClient() : ClientEntityInterface
- getExpiryDateTime() : DateTimeImmutable
- getIdentifier() : string
- getScopes() : array<string|int, ScopeEntityInterface>
- getUserIdentifier() : string|int
- initJwtConfiguration() : mixed
- Initialise the JWT Configuration.
- setClient() : void
- Set Client
- setPrivateKey() : mixed
- Set the private key used to encrypt this access token.
- setUserIdentifier() : void
- Set User Identifier
- convertToJWT() : Token
- Generate a JWT from the access token (RFC 9068 compliant)
- generateKid() : string
- 公開鍵からkid (Key ID) を生成
- getIssuer() : string
- RFC 9068準拠のアクセストークンのためのissuer URLを取得
- getResource() : string
- RFC 9068準拠のアクセストークンのためのResource URLを取得
- getScopeString() : string
- スコープを文字列形式で取得(RFC 9068準拠)
Properties
$jwtConfiguration
private
Configuration
$jwtConfiguration
$privateKey
private
CryptKey
$privateKey
Methods
__toString()
Generate a string representation from the access token
public
__toString() : mixed
addScope()
Add Scope
public
addScope(ScopeEntityInterface $scope) : void
Parameters
- $scope : ScopeEntityInterface
getClient()
public
abstract getClient() : ClientEntityInterface
Return values
ClientEntityInterfacegetExpiryDateTime()
public
abstract getExpiryDateTime() : DateTimeImmutable
Return values
DateTimeImmutablegetIdentifier()
public
abstract getIdentifier() : string
Return values
stringgetScopes()
public
abstract getScopes() : array<string|int, ScopeEntityInterface>
Return values
array<string|int, ScopeEntityInterface>getUserIdentifier()
public
abstract getUserIdentifier() : string|int
Return values
string|intinitJwtConfiguration()
Initialise the JWT Configuration.
public
initJwtConfiguration() : mixed
setClient()
Set Client
public
setClient(ClientEntityInterface $client) : void
Parameters
- $client : ClientEntityInterface
setPrivateKey()
Set the private key used to encrypt this access token.
public
setPrivateKey(CryptKey $privateKey) : mixed
Parameters
- $privateKey : CryptKey
setUserIdentifier()
Set User Identifier
public
setUserIdentifier(string|int|null $identifier) : void
Parameters
- $identifier : string|int|null
convertToJWT()
Generate a JWT from the access token (RFC 9068 compliant)
private
convertToJWT() : Token
Return values
TokengenerateKid()
公開鍵からkid (Key ID) を生成
private
generateKid() : string
Return values
stringgetIssuer()
RFC 9068準拠のアクセストークンのためのissuer URLを取得
private
getIssuer() : string
Return values
stringgetResource()
RFC 9068準拠のアクセストークンのためのResource URLを取得
private
getResource() : string
Return values
stringgetScopeString()
スコープを文字列形式で取得(RFC 9068準拠)
private
getScopeString() : string