Documentation

OAuthStorageInterface

Specifies the methods required for an OAuth token storage adapter

The token storage is intended to be invoked per-user, for whom it can store tokens for any of the implemented providers.

The implementer must ensure that the same storage instance is not used for multiple users.

Table of Contents

Methods

clearAccessToken()  : static
Deletes the access token for a given $service (and current user)
clearAllAccessTokens()  : static
Deletes all access tokens (for the current user)
clearAllCSRFStates()  : static
Deletes all stored CSRF states (for the current user)
clearCSRFState()  : static
Deletes a CSRF state for the given $service (and current user)
fromStorage()  : AccessToken
Retrieves token JOSN from the underlying storage engine and returns an AccessToken
getAccessToken()  : AccessToken
Retrieves an AccessToken for the given $service
getCSRFState()  : string
Retrieves a CSRF <state> value for the given $service
hasAccessToken()  : bool
Checks if a token for $service exists
hasCSRFState()  : bool
Checks if a CSRF state for the given provider exists
setLogger()  : static
Sets a logger. (LoggerAwareInterface is stupid)
storeAccessToken()  : static
Stores an AccessToken for the given $service
storeCSRFState()  : static
Stores a CSRF <state> value for the given $service
toStorage()  : mixed
Prepares an AccessToken for storage (serialize, encrypt etc.) and returns a value that is suited for the underlying storage engine

Methods

clearAccessToken()

Deletes the access token for a given $service (and current user)

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

clearCSRFState()

Deletes a CSRF state for the given $service (and current user)

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

getCSRFState()

Retrieves a CSRF <state> value for the given $service

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

hasAccessToken()

Checks if a token for $service exists

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

hasCSRFState()

Checks if a CSRF state for the given provider exists

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

setLogger()

Sets a logger. (LoggerAwareInterface is stupid)

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

storeCSRFState()

Stores a CSRF <state> value for the given $service

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

        
On this page

Search results