Documentation

ProviderLiveTestMemoryStorage extends MemoryStorage
in package

FinalYes

Extends the standard memory storage so that it also saves tokens as JSON in the given path

Table of Contents

Properties

$logger  : LoggerInterface
$options  : OAuthOptions|SettingsContainerInterface
$states  : array<string|int, mixed>
the CSRF state storage array
$storagePath  : string
$tokens  : array<string|int, mixed>
the token storage array

Methods

__construct()  : mixed
clearAccessToken()  : static
clearAllAccessTokens()  : static
clearAllCSRFStates()  : static
clearCSRFState()  : static
fromStorage()  : AccessToken
Retrieves token JOSN from the underlying storage engine and returns an AccessToken
getAccessToken()  : AccessToken
getCSRFState()  : string
hasAccessToken()  : bool
hasCSRFState()  : bool
setLogger()  : static
Sets a logger. (LoggerAwareInterface is stupid)
storeAccessToken()  : static
storeCSRFState()  : static
toStorage()  : mixed
Prepares an AccessToken for storage (serialize, encrypt etc.) and returns a value that is suited for the underlying storage engine
construct()  : void
A replacement constructor that you can call in extended classes, so that you don't have to implement the monstrous original `__construct()`
getServiceName()  : string
Gets the current service provider name

Properties

$states

the CSRF state storage array

protected array<string|int, mixed> $states = []

$tokens

the token storage array

protected array<string|int, mixed> $tokens = []

Methods

clearAccessToken()

public clearAccessToken(string $service) : static
Parameters
$service : string
Tags
inheritDoc
Return values
static

clearAllAccessTokens()

public clearAllAccessTokens() : static
Tags
inheritDoc
Return values
static

clearAllCSRFStates()

public clearAllCSRFStates() : static
Tags
inheritDoc
Return values
static

clearCSRFState()

public clearCSRFState(string $service) : static
Parameters
$service : string
Tags
inheritDoc
Return values
static

fromStorage()

Retrieves token JOSN from the underlying storage engine and returns an AccessToken

public fromStorage(mixed $data) : AccessToken
Parameters
$data : mixed
Tags
inheritDoc
Return values
AccessToken

getCSRFState()

public getCSRFState(string $service) : string
Parameters
$service : string
Tags
inheritDoc
Return values
string

hasAccessToken()

public hasAccessToken(string $service) : bool
Parameters
$service : string
Tags
inheritDoc
Return values
bool

hasCSRFState()

public hasCSRFState(string $service) : bool
Parameters
$service : string
Tags
inheritDoc
Return values
bool

setLogger()

Sets a logger. (LoggerAwareInterface is stupid)

public setLogger(LoggerInterface $logger) : static
Parameters
$logger : LoggerInterface
Tags
inheritDoc
codeCoverageIgnore
Return values
static

storeCSRFState()

public storeCSRFState(string $state, string $service) : static
Parameters
$state : string
$service : string
Tags
inheritDoc
Return values
static

toStorage()

Prepares an AccessToken for storage (serialize, encrypt etc.) and returns a value that is suited for the underlying storage engine

public toStorage(AccessToken $token) : mixed
Parameters
$token : AccessToken
Tags
inheritDoc

construct()

A replacement constructor that you can call in extended classes, so that you don't have to implement the monstrous original `__construct()`

protected construct() : void

        
On this page

Search results