Raydium Framework

AuthManager
in package

Table of Contents

$authValidator  : mixed
$currentUser  : mixed
$configs  : mixed
$cookies  : mixed
__construct()  : mixed
check()  : bool
Check if the current user is authenticated.
isKioskUser()  : null|array<string|int, mixed>|false
isSuperAdmin()  : bool
Determines if the current user is a kiosk admin.
setConfigs()  : void
setCookies()  : void
setValidator()  : void
user()  : null|array<string|int, mixed>
Get the currently authenticated user.
userCan()  : bool
getAuthCookie()  : null|string
Get the authentication cookie from the request.
getKioskUser()  : array<string|int, mixed>|null
getLoggedInCookie()  : string|null
getSecureAuthCookie()  : null|string
Get the secure cookie from the request.
getCookie()  : string|null

Properties

Methods

check()

Check if the current user is authenticated.

public check([string $scheme = 'http' ]) : bool
Parameters
$scheme : string = 'http'
Return values
bool

isKioskUser()

public isKioskUser() : null|array<string|int, mixed>|false
Return values
null|array<string|int, mixed>|false

isSuperAdmin()

Determines if the current user is a kiosk admin.

public isSuperAdmin() : bool

This method checks whether the current user has the 'admin' role. It first verifies if the user is a kiosk user. If not, it returns false. Otherwise, it checks if the kiosk user's role is 'admin'.

Return values
bool

Returns true if the user is an admin, false if not a kiosk user.

setCookies()

public setCookies(array<string|int, mixed> $cookies) : void
Parameters
$cookies : array<string|int, mixed>
Return values
void

setValidator()

public setValidator() : void
Return values
void

user()

Get the currently authenticated user.

public user() : null|array<string|int, mixed>
Return values
null|array<string|int, mixed>

userCan()

public userCan([string $capability = 'manage_kiosk' ]) : bool
Parameters
$capability : string = 'manage_kiosk'
Return values
bool

getAuthCookie()

Get the authentication cookie from the request.

protected getAuthCookie() : null|string
Return values
null|string

getKioskUser()

protected getKioskUser(string $username) : array<string|int, mixed>|null
Parameters
$username : string
Return values
array<string|int, mixed>|null

getLoggedInCookie()

protected getLoggedInCookie() : string|null
Return values
string|null

getSecureAuthCookie()

Get the secure cookie from the request.

protected getSecureAuthCookie() : null|string
Return values
null|string

getCookie()

private getCookie(string $key) : string|null
Parameters
$key : string
Return values
string|null

Search results