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

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

Méthodes publiques

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

Method Details

__construct() public méthode

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 méthode

public getCredentials ( )

getSecret() public méthode

Returns the secret.
public getSecret ( ) : string
Résultat string

serialize() public méthode

public serialize ( )

unserialize() public méthode

public unserialize ( $serialized )