Documentation

Auth
in package
implements AuthInterface

Description of Auth

Tags
author

zozlak

Table of Contents

Interfaces

AuthInterface
Interface for metadata access authorization.

Constants

DEFAULT_ALLOW  = 'allow'
DEFAULT_DENY  = 'deny'
DICT_ADVERTISE  = ['none' => \zozlak\auth\AuthController::ADVERTISE_NONE, 'once' => \zozlak\auth\AuthController::ADVERTISE_ONCE, 'always' => \zozlak\auth\AuthController::ADVERTISE_ALWAYS]

Properties

$authenticated  : bool
$controller  : AuthController
$isAdmin  : bool
$isCreator  : bool
$isPublic  : bool
$userName  : string
$userRoles  : array<string|int, string>

Methods

__construct()  : mixed
batchCheckAccessRights()  : void
checkAccessRights()  : void
checkCreateRights()  : void
denyAccess()  : void
getCreateRights()  : DatasetNode
getMetadataAuthQuery()  : QueryPart
Returns (if needed according to the config) an SQL query returning a list of resource ids the current user can read.
getUserName()  : string
getUserRoles()  : array<string|int, string>
isAdmin()  : bool
isPublic()  : bool
logout()  : void
getCookieHeaderValue()  : string

Constants

DEFAULT_ALLOW

public mixed DEFAULT_ALLOW = 'allow'

DEFAULT_DENY

public mixed DEFAULT_DENY = 'deny'

DICT_ADVERTISE

public mixed DICT_ADVERTISE = ['none' => \zozlak\auth\AuthController::ADVERTISE_NONE, 'once' => \zozlak\auth\AuthController::ADVERTISE_ONCE, 'always' => \zozlak\auth\AuthController::ADVERTISE_ALWAYS]

Properties

$authenticated

private bool $authenticated

$controller

private AuthController $controller

$isAdmin

private bool $isAdmin

$isCreator

private bool $isCreator

$isPublic

private bool $isPublic

$userName

private string $userName

$userRoles

private array<string|int, string> $userRoles

Methods

__construct()

public __construct() : mixed

batchCheckAccessRights()

public batchCheckAccessRights(string $table, string $privilege, bool $metadataRead) : void
Parameters
$table : string
$privilege : string
$metadataRead : bool

checkAccessRights()

public checkAccessRights(int $resId, string $privilege, bool $metadataRead[, bool $deny = true ]) : void
Parameters
$resId : int
$privilege : string
$metadataRead : bool
$deny : bool = true

checkCreateRights()

public checkCreateRights() : void

denyAccess()

public denyAccess(array<string|int, string> $allowed) : void
Parameters
$allowed : array<string|int, string>
Tags
throws
RepoException

getCreateRights()

public getCreateRights() : DatasetNode
Return values
DatasetNode

getMetadataAuthQuery()

Returns (if needed according to the config) an SQL query returning a list of resource ids the current user can read.

public getMetadataAuthQuery() : QueryPart
Return values
QueryPart

getUserName()

public getUserName() : string
Return values
string

getUserRoles()

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

isAdmin()

public isAdmin() : bool
Return values
bool

isPublic()

public isPublic() : bool
Return values
bool

logout()

public logout([string $redirectUrl = '' ]) : void
Parameters
$redirectUrl : string = ''

getCookieHeaderValue()

private getCookieHeaderValue(string $name[, string $value = '' ][, int $expires = -1 ][, string $path = '' ]) : string
Parameters
$name : string
$value : string = ''
$expires : int = -1
$path : string = ''
Return values
string

        
On this page

Search results