auth.ValidateJwtTokenResp
*/
class ValidateJwtTokenResp extends \Google\Protobuf\Internal\Message
{
/**
* 验证结果
*
* Generated from protobuf field .auth.JwtVerifyResult result = 1;
*/
protected $result = 0;
/**
* 换发的新token
*
* Generated from protobuf field string new_token = 2;
*/
protected $new_token = '';
/**
* jwt token解析出来的claims数据
*
* Generated from protobuf field optional .auth.JwtClaims claims = 3;
*/
protected $claims = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $result
* 验证结果
* @type string $new_token
* 换发的新token
* @type \GRPC\Auth\JwtClaims $claims
* jwt token解析出来的claims数据
* }
*/
public function __construct($data = NULL) {
\GRPC\GPBMetadata\Auth::initOnce();
parent::__construct($data);
}
/**
* 验证结果
*
* Generated from protobuf field .auth.JwtVerifyResult result = 1;
* @return int
*/
public function getResult()
{
return $this->result;
}
/**
* 验证结果
*
* Generated from protobuf field .auth.JwtVerifyResult result = 1;
* @param int $var
* @return $this
*/
public function setResult($var)
{
GPBUtil::checkEnum($var, \GRPC\Auth\JwtVerifyResult::class);
$this->result = $var;
return $this;
}
/**
* 换发的新token
*
* Generated from protobuf field string new_token = 2;
* @return string
*/
public function getNewToken()
{
return $this->new_token;
}
/**
* 换发的新token
*
* Generated from protobuf field string new_token = 2;
* @param string $var
* @return $this
*/
public function setNewToken($var)
{
GPBUtil::checkString($var, True);
$this->new_token = $var;
return $this;
}
/**
* jwt token解析出来的claims数据
*
* Generated from protobuf field optional .auth.JwtClaims claims = 3;
* @return \GRPC\Auth\JwtClaims|null
*/
public function getClaims()
{
return $this->claims;
}
public function hasClaims()
{
return isset($this->claims);
}
public function clearClaims()
{
unset($this->claims);
}
/**
* jwt token解析出来的claims数据
*
* Generated from protobuf field optional .auth.JwtClaims claims = 3;
* @param \GRPC\Auth\JwtClaims $var
* @return $this
*/
public function setClaims($var)
{
GPBUtil::checkMessage($var, \GRPC\Auth\JwtClaims::class);
$this->claims = $var;
return $this;
}
}