PHP Class Symfony\Component\Security\Http\RememberMe\AbstractRememberMeServices

Author: Johannes M. Schmitt ([email protected])
Inheritance: implements Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface, implements Symfony\Component\Security\Http\Logout\LogoutHandlerInterface
Datei anzeigen Open project: pmjones/php-framework-benchmarks Class Usage Examples

Protected Properties

Property Type Description
$logger
$options

Public Methods

Method Description
__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.

Protected Methods

Method Description
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().

Method Details

__construct() public method

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() final public method

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
return Symfony\Component\Security\Core\Authentication\Token\TokenInterface

cancelCookie() protected method

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

decodeCookie() protected method

Decodes the raw cookie value
protected decodeCookie ( string $rawCookie ) : array
$rawCookie string
return array

encodeCookie() protected method

Encodes the cookie parts
protected encodeCookie ( array $cookieParts ) : string
$cookieParts array
return string

getKey() public method

public getKey ( )

getRememberMeParameter() public method

Returns the parameter that is used for checking whether remember-me services have been requested.
public getRememberMeParameter ( ) : string
return string

getUserProvider() final protected method

final protected getUserProvider ( $class )

isRememberMeRequested() protected method

Checks whether remember-me capabilities where requested
protected isRememberMeRequested ( Request $request ) : boolean
$request Symfony\Component\HttpFoundation\Request
return boolean

loginFail() final public method

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

loginSuccess() final public method

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() public method

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 method

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

onLoginSuccess() abstract protected method

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() abstract protected method

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
return Symfony\Component\Security\Core\Authentication\Token\TokenInterface

Property Details

$logger protected_oe property

protected $logger

$options protected_oe property

protected $options