LimeSurvey API - Master branch

AuthenticationTokenSimple
in package
implements AuthenticationInterface

Table of Contents

Interfaces

AuthenticationInterface

Constants

ERROR_INVALID_SESSION_KEY  = 'INVALID_SESSION_KEY'

Properties

$formatterDateTimeToJson  : FormatterDateTimeToJson
$sessionUtil  : SessionUtil

Methods

__construct()  : mixed
Constructor
createSession()  : Session
Create session key
getTokenData()  : array<string|int, mixed>
Get Token Data
isAuthenticated()  : bool
Check Key
login()  : array<string|int, mixed>
Login with username and password
logout()  : void
Logout
refresh()  : array<string|int, mixed>
Refresh token

Constants

Properties

Methods

getTokenData()

Get Token Data

public getTokenData(Session $session, string|int $userId) : array<string|int, mixed>
Parameters
$session : Session
$userId : string|int
Return values
array<string|int, mixed>

isAuthenticated()

Check Key

public isAuthenticated(string $token) : bool

Check if the session key is valid. If yes returns true, otherwise false and sends an error message with error code 1

Parameters
$token : string
Return values
bool

login()

Login with username and password

public login(string $username, string $password) : array<string|int, mixed>
Parameters
$username : string
$password : string
Return values
array<string|int, mixed>

refresh()

Refresh token

public refresh(string $token) : array<string|int, mixed>
Parameters
$token : string
Return values
array<string|int, mixed>

        
On this page

Search results