PHP Class Symfony\Component\Security\Core\Authentication\Token\AnonymousToken

Author: Fabien Potencier ([email protected])
Inheritance: extends AbstractToken
Datei anzeigen Open project: symfony/symfony Class Usage Examples

Public Methods

Method Description
__construct ( string $secret, string | object $user, array $roles = [] ) Constructor.
getCredentials ( )
getSecret ( ) : string Returns the secret.
serialize ( )
unserialize ( $serialized )

Method Details

__construct() public method

Constructor.
public __construct ( string $secret, string | object $user, array $roles = [] )
$secret string A secret used to make sure the token is created by the app and not by a malicious client
$user string | object The user can be a UserInterface instance, or an object implementing a __toString method or the username as a regular string
$roles array An array of roles

getCredentials() public method

public getCredentials ( )

getSecret() public method

Returns the secret.
public getSecret ( ) : string
return string

serialize() public method

public serialize ( )

unserialize() public method

public unserialize ( $serialized )