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