\AdventureRes\Authentication AdventureResSession

Class AdventureResSession

Summary

Methods
Properties
Constants
__call()
__construct()
setApp()
setHttpClient()
getSessionId()
isValidSessionId()
clearSession()
No public properties found
API_SERVICE
LOGIN_ENDPOINT
VALID_SESSION_ENDPOINT
setSessionId()
authenticate()
$sessionId
$httpClient
$client
$app
N/A
No private methods found
No private properties found
N/A

Constants

API_SERVICE

API_SERVICE

The API service used in this class.

LOGIN_ENDPOINT

LOGIN_ENDPOINT

The API endpoint used to login.

VALID_SESSION_ENDPOINT

VALID_SESSION_ENDPOINT

The API endpoint used to validate a session.

Properties

$sessionId

$sessionId : string

Type

string

Methods

__call()

__call(  $command,   $arguments) 

Parameters

$command
$arguments

getSessionId()

getSessionId() : string

Returns a valid Session ID. If a session ID has not been created, it will run the authentication to create one. If a session ID has been created, it will validate it and then return a valid ID.

Returns

string

isValidSessionId()

isValidSessionId(string  $sessionId) : boolean

Checks to see if a session ID is valid.

Parameters

string $sessionId

Throws

\AdventureRes\Exceptions\AdventureResSDKException

Returns

boolean

clearSession()

clearSession() 

Clears a session ID.

setSessionId()

setSessionId() 

Sets the session Id from persistent data or authentication via API.

authenticate()

authenticate() : string

Attempts to login to the API. Returns a valid SessionId if successful.

Throws

\AdventureRes\Exceptions\AdventureResSDKException

Returns

string