Magrathea PHP 2

MagratheaApiAuth extends MagratheaApiControl
in package

Control for Create, Read, List, Update, Delete

Table of Contents

Properties

$jwtEncodeType  : mixed
$tokenExpire  : mixed
$userInfo  : mixed
$model  : mixed
$service  : mixed

Methods

CheckExpire()  : bool
check if token is expired
Create()  : mixed
Delete()  : mixed
GetAllHeaders()  : mixed
getAuthorizationHeader()  : mixed
Get header Authorization
GetAuthorizationToken()  : mixed
GetHeaders()  : mixed
GetPhpInput()  : mixed
GetPost()  : mixed
GetPut()  : mixed
GetSecret()  : string
getTokenByType()  : string|null
get access token from header
GetTokenInfo()  : mixed
IsLogged()  : bool
check if user is logged with used token
jwtDecode()  : mixed
jwtEncode()  : mixed
List()  : mixed
Read()  : mixed
Refresh()  : array<string|int, mixed>
ResponseLogin()  : array<string|int, mixed>
ResponsePayload()  : array<string|int, mixed>
Update()  : mixed

Properties

Methods

CheckExpire()

check if token is expired

public CheckExpire() : bool
Return values
bool

is expired?

Delete()

public Delete([mixed $params = false ]) : mixed
Parameters
$params : mixed = false

getAuthorizationHeader()

Get header Authorization

public getAuthorizationHeader() : mixed

getTokenByType()

get access token from header

public getTokenByType(string $type) : string|null
Parameters
$type : string

can be 'Bearer' (for Berarer token) or 'Basic' (for Basic token)

Return values
string|null

token

GetTokenInfo()

public GetTokenInfo([mixed $token = false ]) : mixed
Parameters
$token : mixed = false

IsLogged()

check if user is logged with used token

public IsLogged() : bool
Return values
bool

is logged?

jwtDecode()

public jwtDecode(mixed $token) : mixed
Parameters
$token : mixed

jwtEncode()

public jwtEncode(mixed $payload) : mixed
Parameters
$payload : mixed

Read()

public Read([mixed $params = false ]) : mixed
Parameters
$params : mixed = false

Refresh()

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

ResponsePayload()

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

Update()

public Update([mixed $params = false ]) : mixed
Parameters
$params : mixed = false

        
On this page

Search results