OAuth2ClientRepository
in package
implements
ClientRepositoryInterface
OAuth2 Client Repository
Table of Contents
Interfaces
- ClientRepositoryInterface
Properties
- $clientsTable : Oauth2ClientsTable
- Oauth2ClientsTable インスタンス
Methods
- __construct() : mixed
- コンストラクタ
- deleteClient() : bool
- クライアントを削除(Dynamic Client Registration用)
- getClientEntity() : ClientEntityInterface|null
- クライアントエンティティを取得
- getClientInfo() : array<string|int, mixed>|null
- クライアント情報を取得(Dynamic Client Registration用)
- registerClient() : string
- 新しいクライアントを登録(Dynamic Client Registration用)
- updateClient() : bool
- クライアント情報を更新(Dynamic Client Registration用)
- validateClient() : bool
- クライアント認証
- createClientEntity() : ClientEntityInterface
- OAuth2Clientエンティティを作成
Properties
$clientsTable
Oauth2ClientsTable インスタンス
private
Oauth2ClientsTable
$clientsTable
Methods
__construct()
コンストラクタ
public
__construct() : mixed
deleteClient()
クライアントを削除(Dynamic Client Registration用)
public
deleteClient(string $clientId) : bool
Parameters
- $clientId : string
-
クライアントID
Return values
bool —削除成功
getClientEntity()
クライアントエンティティを取得
public
getClientEntity(string $clientIdentifier) : ClientEntityInterface|null
ClientRepositoryInterface::getClientEntity($clientIdentifier) に準拠。 ここではエンティティ取得のみを行い、認証やグラントの検証は validateClient() 側で行う。
Parameters
- $clientIdentifier : string
-
クライアントID
Return values
ClientEntityInterface|nullgetClientInfo()
クライアント情報を取得(Dynamic Client Registration用)
public
getClientInfo(string $clientId) : array<string|int, mixed>|null
Parameters
- $clientId : string
-
クライアントID
Return values
array<string|int, mixed>|null —クライアント情報
registerClient()
新しいクライアントを登録(Dynamic Client Registration用)
public
registerClient(array<string|int, mixed> $clientData) : string
Parameters
- $clientData : array<string|int, mixed>
-
クライアントデータ
Return values
string —登録されたクライアントID
updateClient()
クライアント情報を更新(Dynamic Client Registration用)
public
updateClient(string $clientId, array<string|int, mixed> $updateData) : bool
Parameters
- $clientId : string
-
クライアントID
- $updateData : array<string|int, mixed>
-
更新データ
Return values
bool —更新成功
validateClient()
クライアント認証
public
validateClient(string $clientIdentifier, string|null $clientSecret, string|null $grantType) : bool
Parameters
- $clientIdentifier : string
-
クライアントID
- $clientSecret : string|null
-
クライアント秘密キー
- $grantType : string|null
-
グラントタイプ
Return values
boolcreateClientEntity()
OAuth2Clientエンティティを作成
private
createClientEntity(Oauth2Client $clientData) : ClientEntityInterface
Parameters
- $clientData : Oauth2Client