Login
extends BaseController
in package
User authentication
Table of Contents
- $acessToken : string
- get() : void
- Authenticate the user
- json() : void
- Returns json output
- setAccessToken() : void
- Set JWT regenerated token
- doesUserExist() : bool
- Checks if the users record exists
- saveFingerprint() : void
- Save generated fingerprint in database
Properties
$acessToken
private
static string
$acessToken
Set if JWT token is renewed
Methods
get()
Authenticate the user
public
static get() : void
Return values
void —json()
Returns json output
public
json(mixed $code, array<string|int, mixed> $data) : void
Parameters
- $code : mixed
- $data : array<string|int, mixed>
Return values
void —setAccessToken()
Set JWT regenerated token
public
static setAccessToken(string $token) : void
Parameters
- $token : string
Return values
void —doesUserExist()
Checks if the users record exists
private
doesUserExist(object $pdo, string $email, string $password) : bool
Parameters
- $pdo : object
- $email : string
- $password : string
Return values
bool —saveFingerprint()
Save generated fingerprint in database
private
saveFingerprint(object $pdo, string $email) : void
Parameters
- $pdo : object
- $email : string