MCP PHP SDK

InMemoryCredentialStorage implements PendingAuthorizationStorageInterface

FinalYes

Keeps credentials for the lifetime of the process.

Tags
author

Christopher Hertel mail@christopher-hertel.de

Table of Contents

Interfaces

PendingAuthorizationStorageInterface
Storage must be scoped to the user session that initiated authorization.

Properties

$pending  : array<string, PendingAuthorization>
$registrations  : array<string, ClientRegistration>
$tokens  : array<string, array<string, AccessToken>>

Methods

consumePendingAuthorization()  : PendingAuthorization|null
Atomically retrieve and remove a pending authorization, including expired entries.
forget()  : void
Drop everything held for one authorization server, or the whole store when null.
getClientRegistration()  : ClientRegistration|null
getToken()  : AccessToken|null
saveClientRegistration()  : void
savePendingAuthorization()  : void
saveToken()  : void
synchronize()  : T
Run an operation while no other process sharing this storage runs one.

Properties

Methods

forget()

Drop everything held for one authorization server, or the whole store when null.

public forget([string|null $issuer = null ]) : void
Parameters
$issuer : string|null = null

getToken()

public getToken(string $issuer, string $resource) : AccessToken|null
Parameters
$issuer : string

the authorization server's issuer identifier

$resource : string

the canonical URI of the protected resource the token may be sent to, followed by #, the grant and, for a configured client, its client ID

Return values
AccessToken|null

synchronize()

Run an operation while no other process sharing this storage runs one.

public synchronize(callable $operation) : T
Parameters
$operation : callable
Return values
T
On this page

Search results