Auth0-PHP

SessionStore
in package
implements StoreInterface

Read onlyYes
FinalYes

This class provides a layer to persist data using PHP Sessions.

Table of Contents

Interfaces

StoreInterface

Properties

$configuration  : SdkConfiguration
$sessionPrefix  : string

Methods

__construct()  : mixed
SessionStore constructor.
defer()  : void
This has no effect when using sessions as the storage medium.
delete()  : void
Removes a persisted value identified by $key.
get()  : mixed
Gets persisted values identified by $key.
getSessionName()  : string
Constructs a session key name.
purge()  : void
Removes all persisted values.
regenerate()  : void
Regenerate the session ID while preserving session data.
set()  : void
Persists $value on $_SESSION, identified by $key.
start()  : void
This basic implementation of BaseAuth0 SDK uses PHP Sessions to store volatile data.

Properties

Methods

__construct()

SessionStore constructor.

public __construct(SdkConfiguration $configuration[, string $sessionPrefix = 'auth0' ]) : mixed
Parameters
$configuration : SdkConfiguration

Base configuration options for the SDK. See the SdkConfiguration class constructor for options.

$sessionPrefix : string = 'auth0'

a string to prefix session keys with

defer()

This has no effect when using sessions as the storage medium.

public defer(bool $deferring) : void
Parameters
$deferring : bool

whether to defer persisting the storage state

Tags
codeCoverageIgnore

delete()

Removes a persisted value identified by $key.

public delete(string $key) : void
Parameters
$key : string

session key to delete

get()

Gets persisted values identified by $key.

public get(string $key[, mixed $default = null ]) : mixed

If the value is not set, returns $default.

Parameters
$key : string

session key to set

$default : mixed = null

default to return if nothing was found

getSessionName()

Constructs a session key name.

public getSessionName(string $key) : string
Parameters
$key : string

session key name to prefix and return

Return values
string

purge()

Removes all persisted values.

public purge() : void

regenerate()

Regenerate the session ID while preserving session data.

public regenerate() : void

Called on authentication state changes to prevent session fixation.

set()

Persists $value on $_SESSION, identified by $key.

public set(string $key, mixed $value) : void
Parameters
$key : string

session key to set

$value : mixed

value to use

start()

This basic implementation of BaseAuth0 SDK uses PHP Sessions to store volatile data.

public start() : void
On this page

Search results