src/Auth/JwtAuth.php
/**
     * Validate the access token.
     *
     * @param string $accessToken The JWT
     *
     * @return bool The status
     */
Validate the access token.
@param string $accessToken The JWT

@return bool The status
Validate the access token . @param string $accessToken The JWT @return bool The status
public function validateToken(string $accessToken): bool
    {
        $token = $this->createParsedToken($accessToken);
        if (!$token->verify($this->signer, $this->publicKey)) {
            return false;
        }
        $data = new ValidationData();
        $data->setCurrentTime(Chronos::now()->getTimestamp());
        $data->setIssuer($token->getClaim('iss'));
        $data->setId($token->getClaim('jti'));
        return $token->validate($data);
    }
public function validateToken ( string $ accessToken ) : bool { $ token = $ this -> createParsedToken ( $ accessToken ) ; if ( ! $ token -> verify ( $ this -> signer , $ this -> publicKey ) ) { return false ; } $ data = new ValidationData ( ) ; $ data -> setCurrentTime ( Chronos :: now ( ) -> getTimestamp ( ) ) ; $ data -> setIssuer ( $ token -> getClaim ( 'iss' ) ) ; $ data -> setId ( $ token -> getClaim ( 'jti' ) ) ; return $ token -> validate ( $ data ) ; }
Validate the access token.
Validate the access token .
// Token signature is not valid // Check whether the token has not expired