PHP Класс Symfony\Component\Security\Http\RememberMe\AbstractRememberMeServices

Автор: Johannes M. Schmitt ([email protected])
Наследование: implements Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface, implements Symfony\Component\Security\Http\Logout\LogoutHandlerInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$logger
$options

Открытые методы

Метод Описание
__construct ( array $userProviders, string $key, string $providerKey, array $options = [], Symfony\Component\HttpKernel\Log\LoggerInterface $logger = null ) Constructor
autoLogin ( Request $request ) : Symfony\Component\Security\Core\Authentication\Token\TokenInterface Implementation of RememberMeServicesInterface. Detects whether a remember-me cookie was set, decodes it, and hands it to subclasses for further processing.
getKey ( )
getRememberMeParameter ( ) : string Returns the parameter that is used for checking whether remember-me services have been requested.
loginFail ( Request $request ) Implementation for RememberMeServicesInterface. Deletes the cookie when an attempted authentication fails.
loginSuccess ( Request $request, Response $response, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token ) Implementation for RememberMeServicesInterface. This is called when an authentication is successful.
logout ( Request $request, Response $response, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token ) Implementation for LogoutHandlerInterface. Deletes the cookie.

Защищенные методы

Метод Описание
cancelCookie ( Request $request ) Deletes the remember-me cookie
decodeCookie ( string $rawCookie ) : array Decodes the raw cookie value
encodeCookie ( array $cookieParts ) : string Encodes the cookie parts
getUserProvider ( $class )
isRememberMeRequested ( Request $request ) : boolean Checks whether remember-me capabilities where requested
onLoginFail ( Request $request )
onLoginSuccess ( Request $request, Response $response, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token ) This is called after a user has been logged in successfully, and has requested remember-me capabilities. The implementation usually sets a cookie and possibly stores a persistent record of it.
processAutoLoginCookie ( array $cookieParts, Request $request ) : Symfony\Component\Security\Core\Authentication\Token\TokenInterface Subclasses should validate the cookie and do any additional processing that is required. This is called from autoLogin().

Описание методов

__construct() публичный Метод

Constructor
public __construct ( array $userProviders, string $key, string $providerKey, array $options = [], Symfony\Component\HttpKernel\Log\LoggerInterface $logger = null )
$userProviders array
$key string
$providerKey string
$options array
$logger Symfony\Component\HttpKernel\Log\LoggerInterface

autoLogin() закрытый публичный Метод

Implementation of RememberMeServicesInterface. Detects whether a remember-me cookie was set, decodes it, and hands it to subclasses for further processing.
final public autoLogin ( Request $request ) : Symfony\Component\Security\Core\Authentication\Token\TokenInterface
$request Symfony\Component\HttpFoundation\Request
Результат Symfony\Component\Security\Core\Authentication\Token\TokenInterface

cancelCookie() защищенный Метод

Deletes the remember-me cookie
protected cancelCookie ( Request $request )
$request Symfony\Component\HttpFoundation\Request

decodeCookie() защищенный Метод

Decodes the raw cookie value
protected decodeCookie ( string $rawCookie ) : array
$rawCookie string
Результат array

encodeCookie() защищенный Метод

Encodes the cookie parts
protected encodeCookie ( array $cookieParts ) : string
$cookieParts array
Результат string

getKey() публичный Метод

public getKey ( )

getRememberMeParameter() публичный Метод

Returns the parameter that is used for checking whether remember-me services have been requested.
public getRememberMeParameter ( ) : string
Результат string

getUserProvider() закрытый защищенный Метод

final protected getUserProvider ( $class )

isRememberMeRequested() защищенный Метод

Checks whether remember-me capabilities where requested
protected isRememberMeRequested ( Request $request ) : boolean
$request Symfony\Component\HttpFoundation\Request
Результат boolean

loginFail() закрытый публичный Метод

Implementation for RememberMeServicesInterface. Deletes the cookie when an attempted authentication fails.
final public loginFail ( Request $request )
$request Symfony\Component\HttpFoundation\Request

loginSuccess() закрытый публичный Метод

Implementation for RememberMeServicesInterface. This is called when an authentication is successful.
final public loginSuccess ( Request $request, Response $response, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token )
$request Symfony\Component\HttpFoundation\Request
$response Symfony\Component\HttpFoundation\Response
$token Symfony\Component\Security\Core\Authentication\Token\TokenInterface The token that resulted in a successful authentication

logout() публичный Метод

Implementation for LogoutHandlerInterface. Deletes the cookie.
public logout ( Request $request, Response $response, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token )
$request Symfony\Component\HttpFoundation\Request
$response Symfony\Component\HttpFoundation\Response
$token Symfony\Component\Security\Core\Authentication\Token\TokenInterface

onLoginFail() защищенный Метод

protected onLoginFail ( Request $request )
$request Symfony\Component\HttpFoundation\Request

onLoginSuccess() абстрактный защищенный Метод

This is called after a user has been logged in successfully, and has requested remember-me capabilities. The implementation usually sets a cookie and possibly stores a persistent record of it.
abstract protected onLoginSuccess ( Request $request, Response $response, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token )
$request Symfony\Component\HttpFoundation\Request
$response Symfony\Component\HttpFoundation\Response
$token Symfony\Component\Security\Core\Authentication\Token\TokenInterface

processAutoLoginCookie() абстрактный защищенный Метод

Subclasses should validate the cookie and do any additional processing that is required. This is called from autoLogin().
abstract protected processAutoLoginCookie ( array $cookieParts, Request $request ) : Symfony\Component\Security\Core\Authentication\Token\TokenInterface
$cookieParts array
$request Symfony\Component\HttpFoundation\Request
Результат Symfony\Component\Security\Core\Authentication\Token\TokenInterface

Описание свойств

$logger защищенное свойство

protected $logger

$options защищенное свойство

protected $options