Documentation

AuthorizationProviderInterface extends AuthenticationProviderInterface
in

Interface for security provider with authorization

Table of Contents

connect()  : string
Method creates conection session
createSession()  : string
Method creates session from existing token or fetched from HTTP headers
getLoginFieldName()  : string
Method returns field name for login
getSelfId()  : int
Method returns id of the session user
getSelfLogin()  : string
Method returns login of the session user
getSessionIdFieldName()  : string
Method returns field name for session_id
hasPermit()  : bool
Method returns true or false if the session user has permit or not
loginAs()  : string
Method allows user to login under another user
validatePermit()  : void
Method throws exception if the user does not have permit

Methods

connect()

Method creates conection session

public connect(string $login, string $password) : string
Parameters
$login : string

login

$password : string

password

Return values
string

session id of the created session

createSession()

Method creates session from existing token or fetched from HTTP headers

public createSession(string $token) : string
Parameters
$token : string

session token

Return values
string

session token

getSelfLogin()

Method returns login of the session user

public getSelfLogin() : string
Return values
string

login of the session user

getSessionIdFieldName()

Method returns field name for session_id

public getSessionIdFieldName() : string
Return values
string

field name

hasPermit()

Method returns true or false if the session user has permit or not

public hasPermit(string $token, string $permit) : bool
Parameters
$token : string

token

$permit : string

permit name

Return values
bool

True if the user has permit

loginAs()

Method allows user to login under another user

public loginAs(string $token, string $loginOrId, string $field) : string
Parameters
$token : string

token

$loginOrId : string

in this field login or user id are passed

$field : string

contains 'login' or 'id'

Return values
string

New session id

validatePermit()

Method throws exception if the user does not have permit

public validatePermit(string $token, string $permit) : void
Parameters
$token : string

token

$permit : string

permit name

Return values
void

Search results

    Яндекс.Метрика