Namshi\JOSE\SimpleJWS::isValid PHP 메소드

isValid() 공개 메소드

Checks that the JWS has been signed with a valid private key by verifying it with a public $key and the token is not expired.
public isValid ( resource | string $key, string $algo = null ) : boolean
$key resource | string
$algo string The algorithms this JWS should be signed with. Use it if you want to restrict which algorithms you want to allow to be validated.
리턴 boolean
    public function isValid($key, $algo = null)
    {
        return $this->verify($key, $algo) && !$this->isExpired();
    }