* @author Eric Lannez */ interface JWTTokenManagerInterface { /** * @return string The JWT token */ public function create(UserInterface $user); public function createFromPayload(UserInterface $user, array $payload = []): string; /** * @return array|false The JWT token payload or false if an error occurs * @throws JWTDecodeFailureException */ public function decode(TokenInterface $token): array|bool; /** * Parses a raw JWT token and returns its payload */ public function parse(string $token): array; /** * Returns the claim used as identifier to load an user from a JWT payload. * * @return string */ public function getUserIdClaim(); }