baserCMS クラスリファレンス

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

Methods

addScope()

Add Scope

public addScope(ScopeEntityInterface $scope) : void
Parameters
$scope : ScopeEntityInterface

getClient()

public abstract getClient() : ClientEntityInterface
Return values
ClientEntityInterface

getExpiryDateTime()

public abstract getExpiryDateTime() : DateTimeImmutable
Return values
DateTimeImmutable

getScopes()

public abstract getScopes() : array<string|int, ScopeEntityInterface>
Return values
array<string|int, ScopeEntityInterface>

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
Token

generateKid()

公開鍵からkid (Key ID) を生成

private generateKid() : string
Return values
string

getIssuer()

RFC 9068準拠のアクセストークンのためのissuer URLを取得

private getIssuer() : string
Return values
string

getResource()

RFC 9068準拠のアクセストークンのためのResource URLを取得

private getResource() : string
Return values
string

getScopeString()

スコープを文字列形式で取得(RFC 9068準拠)

private getScopeString() : string
Return values
string
On this page

Search results