webman_ad/generated/GRPC/Auth/JwtVerifyResult.php
2025-01-06 10:47:22 +08:00

88 lines
2.3 KiB
PHP

<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: proto/auth.proto
namespace GRPC\Auth;
use UnexpectedValueException;
/**
* jwt token验证结果
*
* Protobuf type <code>auth.JwtVerifyResult</code>
*/
class JwtVerifyResult
{
/**
* Generated from protobuf enum <code>JWT_VERIFY_UNSPECIFIED = 0;</code>
*/
const JWT_VERIFY_UNSPECIFIED = 0;
/**
* jwt 正常
*
* Generated from protobuf enum <code>JWT_VERIFY_OK = 1;</code>
*/
const JWT_VERIFY_OK = 1;
/**
* jwt 格式错误
*
* Generated from protobuf enum <code>JWT_VERIFY_BAD_FORMAT = 2;</code>
*/
const JWT_VERIFY_BAD_FORMAT = 2;
/**
* jwt 签名错误
*
* Generated from protobuf enum <code>JWT_VERIFY_SIGN_FAILED = 3;</code>
*/
const JWT_VERIFY_SIGN_FAILED = 3;
/**
* jwt 过期
*
* Generated from protobuf enum <code>JWT_VERIFY_EXPIRED = 4;</code>
*/
const JWT_VERIFY_EXPIRED = 4;
/**
* jwt 被撤销
*
* Generated from protobuf enum <code>JWT_VERIFY_REVOKED = 5;</code>
*/
const JWT_VERIFY_REVOKED = 5;
/**
* jwt 版本过低
*
* Generated from protobuf enum <code>JWT_VERSION_LOW = 6;</code>
*/
const JWT_VERSION_LOW = 6;
private static $valueToName = [
self::JWT_VERIFY_UNSPECIFIED => 'JWT_VERIFY_UNSPECIFIED',
self::JWT_VERIFY_OK => 'JWT_VERIFY_OK',
self::JWT_VERIFY_BAD_FORMAT => 'JWT_VERIFY_BAD_FORMAT',
self::JWT_VERIFY_SIGN_FAILED => 'JWT_VERIFY_SIGN_FAILED',
self::JWT_VERIFY_EXPIRED => 'JWT_VERIFY_EXPIRED',
self::JWT_VERIFY_REVOKED => 'JWT_VERIFY_REVOKED',
self::JWT_VERSION_LOW => 'JWT_VERSION_LOW',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}