About the expiration time of php-jwt

jwt load information contains an exp, description document that says this is the expiration time of jwt, but I set exp but has no effect. Do I have to write another code to get this exp value to set the expiration time? and how to get the content in the jwt load information? I don"t have a clue when I use JWT for the first time.

another jwt library I use is https://github.com/firebase/p.

.
Jun.19,2021

I also use this library. Expiration time is useful. How do you set it

?
$tokenId    = base64_encode(mcrypt_create_iv(32, MCRYPT_DEV_URANDOM));
            $issuedAt   = time();
            $notBefore  = $issuedAt + 20;            
            $expire     = $notBefore + 60*60;            
            $serverName = 'xxx.com';

            $key = C('DATA_AUTH_KEY');
            $token = array(
                "iss" => $serverName,
                "iat" => $issuedAt,
                "exp" => $expire,
                "jti" => $tokenId,
                "data" => $user
            );


            $jwt = JWT::encode($token, $key);
Menu