AuthenticationProvider
in package
implements
AuthenticationProviderInterface
Class provides simple and the most common functionality
Interfaces, Classes and Traits
- AuthenticationProviderInterface
- Interface for security provider with authorization
Table of Contents
- $sessionUserLoginFieldName : string
- Field name in session where we store login of the authorized user
- 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
- sessionId() : void
- Method creates session
Properties
$sessionUserLoginFieldName
Field name in session where we store login of the authorized user
public
string
$sessionUserLoginFieldName
= 'session-user-login'
Methods
connect()
Method creates conection session
public
connect(string $login, string $password) : string
Parameters
- $login : string
-
login
- $password : string
-
password
Tags
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
Tags
Return values
string —session token
getLoginFieldName()
Method returns field name for login
public
getLoginFieldName() : string
Tags
Return values
string —field name
getSelfId()
Method returns id of the session user
public
getSelfId() : int
Tags
Return values
int —id of the session user
getSelfLogin()
Method returns login of the session user
public
getSelfLogin() : string
Tags
Return values
string —login of the session user
getSessionIdFieldName()
Method returns field name for session_id
public
getSessionIdFieldName() : string
Tags
Return values
string —field name
sessionId()
Method creates session
protected
sessionId(string $token) : void
Parameters
- $token : string