SessionStorage
        
        extends OAuthStorageAbstract
    
    
            
            in package
            
        
    
    
    
Implements a session storage adapter.
Note: the session storage is only half persistent, as tokens are stored for the duration of the session.
Table of Contents
Properties
- $logger : LoggerInterface
 - $options : OAuthOptions|SettingsContainerInterface
 - $stateVar : string
 - the key name for the CSRF token storage array in $_SESSION
 - $tokenVar : string
 - the key name for the token storage array in $_SESSION
 
Methods
- __construct() : mixed
 - OAuthStorageAbstract constructor.
 - __destruct() : mixed
 - SessionStorage destructor.
 - clearAccessToken() : static
 - clearAllAccessTokens() : static
 - clearAllCSRFStates() : static
 - clearCSRFState() : static
 - construct() : void
 - SessionStorage (pseudo-) constructor.
 - 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
 - getServiceName() : string
 - Gets the current service provider name
 
Properties
$logger
    protected
        LoggerInterface
    $logger
     = new NullLogger()
    
    
    
$options
    protected
        OAuthOptions|SettingsContainerInterface
    $options
     = new OAuthOptions()
    
    
    
$stateVar
the key name for the CSRF token storage array in $_SESSION
    protected
        string
    $stateVar
    
    
    
    
$tokenVar
the key name for the token storage array in $_SESSION
    protected
        string
    $tokenVar
    
    
    
    
Methods
__construct()
OAuthStorageAbstract constructor.
    public
                    __construct([OAuthOptions|SettingsContainerInterface $options = new OAuthOptions() ][, LoggerInterface $logger = new NullLogger() ]) : mixed
    Parameters
- $options : OAuthOptions|SettingsContainerInterface = new OAuthOptions()
 - $logger : LoggerInterface = new NullLogger()
 
__destruct()
SessionStorage destructor.
    public
                    __destruct() : mixed
    Tags
clearAccessToken()
    public
                    clearAccessToken(string $service) : static
    Parameters
- $service : string
 
Tags
Return values
staticclearAllAccessTokens()
    public
                    clearAllAccessTokens() : static
    Tags
Return values
staticclearAllCSRFStates()
    public
                    clearAllCSRFStates() : static
    Tags
Return values
staticclearCSRFState()
    public
                    clearCSRFState(string $service) : static
    Parameters
- $service : string
 
Tags
Return values
staticconstruct()
SessionStorage (pseudo-) constructor.
    public
                    construct() : void
    fromStorage()
Retrieves token JOSN from the underlying storage engine and returns an AccessToken
    public
                    fromStorage(mixed $data) : AccessToken
    Parameters
- $data : mixed
 
Tags
Return values
AccessTokengetAccessToken()
    public
                    getAccessToken(string $service) : AccessToken
    Parameters
- $service : string
 
Tags
Return values
AccessTokengetCSRFState()
    public
                    getCSRFState(string $service) : string
    Parameters
- $service : string
 
Tags
Return values
stringhasAccessToken()
    public
                    hasAccessToken(string $service) : bool
    Parameters
- $service : string
 
Tags
Return values
boolhasCSRFState()
    public
                    hasCSRFState(string $service) : bool
    Parameters
- $service : string
 
Tags
Return values
boolsetLogger()
Sets a logger. (LoggerAwareInterface is stupid)
    public
                    setLogger(LoggerInterface $logger) : static
    Parameters
- $logger : LoggerInterface
 
Tags
Return values
staticstoreAccessToken()
    public
                    storeAccessToken(AccessToken $token, string $service) : static
    Parameters
- $token : AccessToken
 - $service : string
 
Tags
Return values
staticstoreCSRFState()
    public
                    storeCSRFState(string $state, string $service) : static
    Parameters
- $state : string
 - $service : string
 
Tags
Return values
statictoStorage()
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
getServiceName()
Gets the current service provider name
    protected
                    getServiceName(string $service) : string
    Parameters
- $service : string