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 |