Explore Server Side Testing SDK for PHP

UserProvider implements UserProviderInterface

UserProvider is responsible for providing the user with the correct user hash and session id

Table of Contents

Interfaces

UserProviderInterface

Properties

$newSessionParams  : SessionParams
$storage  : StorageFacadeInterface
$user  : User
$userHash  : string
$userId  : string

Methods

__construct()  : mixed
ensureSession()  : void
Ensure the session
getStorage()  : StorageFacadeInterface
Get the storage driver instance
getUser()  : User
Get the user
getUserHash()  : string
Get the user hash
isSessionStarted()  : bool
Check if the session is started
startSession()  : void
Start the session
generateSessionId()  : string
Generate the session id
generateUserHash()  : string
Generate the user hash
mergeSessionParams()  : void
Merge the session params

Properties

Methods

ensureSession()

Ensure the session

public ensureSession([int $sessionTimeout = 36000 ]) : void
Parameters
$sessionTimeout : int = 36000

getUserHash()

Get the user hash

public getUserHash() : string
Return values
string

isSessionStarted()

Check if the session is started

public isSessionStarted() : bool
Return values
bool

startSession()

Start the session

public startSession([int $sessionTimeout = 36000 ]) : void
Parameters
$sessionTimeout : int = 36000

generateSessionId()

Generate the session id

private generateSessionId() : string
Return values
string

generateUserHash()

Generate the user hash

private generateUserHash(string $userId) : string
Parameters
$userId : string
Return values
string

mergeSessionParams()

Merge the session params

private mergeSessionParams() : void

        
On this page

Search results