Documentation ¶
Index ¶
- Variables
- func RegisterJwtverifierServer(s grpc.ServiceRegistrar, srv JwtverifierServer)
- type JwtverifierClient
- type JwtverifierServer
- type MetaRequest
- type MetaResponse
- func (*MetaResponse) Descriptor() ([]byte, []int)deprecated
- func (x *MetaResponse) GetData() *jwt_pb.VerifierMeta
- func (x *MetaResponse) GetStatus() *jwt_pb.ResponseStatus
- func (*MetaResponse) ProtoMessage()
- func (x *MetaResponse) ProtoReflect() protoreflect.Message
- func (x *MetaResponse) Reset()
- func (x *MetaResponse) String() string
- type UnimplementedJwtverifierServer
- type UnsafeJwtverifierServer
- type VerifyRequest
- func (*VerifyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *VerifyRequest) GetCheckMatchIss() []string
- func (x *VerifyRequest) GetCheckMatchSub() string
- func (x *VerifyRequest) GetCheckMatchallAud() []string
- func (x *VerifyRequest) GetCheckMatchanyAud() []string
- func (x *VerifyRequest) GetCheckNotmatchAud() []string
- func (x *VerifyRequest) GetNotCheckRefreshTokenAud() bool
- func (x *VerifyRequest) GetNotCheckRefreshTokenJti() bool
- func (x *VerifyRequest) GetToken() *jwt_pb.Token
- func (*VerifyRequest) ProtoMessage()
- func (x *VerifyRequest) ProtoReflect() protoreflect.Message
- func (x *VerifyRequest) Reset()
- func (x *VerifyRequest) String() string
- type VerifyResponse
- func (*VerifyResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VerifyResponse) GetJwtStatus() *jwt_pb.JwtStatus
- func (x *VerifyResponse) GetPayload() []byte
- func (x *VerifyResponse) GetStatus() *jwt_pb.ResponseStatus
- func (*VerifyResponse) ProtoMessage()
- func (x *VerifyResponse) ProtoReflect() protoreflect.Message
- func (x *VerifyResponse) Reset()
- func (x *VerifyResponse) String() string
Constants ¶
This section is empty.
Variables ¶
var File_pbschema_jwtverifier_proto protoreflect.FileDescriptor
var Jwtverifier_ServiceDesc = grpc.ServiceDesc{ ServiceName: "jwt.verifier.jwtverifier", HandlerType: (*JwtverifierServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Meta", Handler: _Jwtverifier_Meta_Handler, }, { MethodName: "Verify", Handler: _Jwtverifier_Verify_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pbschema/jwtverifier.proto", }
Jwtverifier_ServiceDesc is the grpc.ServiceDesc for Jwtverifier service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterJwtverifierServer ¶
func RegisterJwtverifierServer(s grpc.ServiceRegistrar, srv JwtverifierServer)
Types ¶
type JwtverifierClient ¶
type JwtverifierClient interface { //查看jwt服务元信息的算法 Meta(ctx context.Context, in *MetaRequest, opts ...grpc.CallOption) (*MetaResponse, error) // Verify 将token解析到的负载转码为JSON字符串返回 Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*VerifyResponse, error) }
JwtverifierClient is the client API for Jwtverifier service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewJwtverifierClient ¶
func NewJwtverifierClient(cc grpc.ClientConnInterface) JwtverifierClient
type JwtverifierServer ¶
type JwtverifierServer interface { //查看jwt服务元信息的算法 Meta(context.Context, *MetaRequest) (*MetaResponse, error) // Verify 将token解析到的负载转码为JSON字符串返回 Verify(context.Context, *VerifyRequest) (*VerifyResponse, error) // contains filtered or unexported methods }
JwtverifierServer is the server API for Jwtverifier service. All implementations must embed UnimplementedJwtverifierServer for forward compatibility
type MetaRequest ¶
type MetaRequest struct {
// contains filtered or unexported fields
}
func (*MetaRequest) Descriptor
deprecated
func (*MetaRequest) Descriptor() ([]byte, []int)
Deprecated: Use MetaRequest.ProtoReflect.Descriptor instead.
func (*MetaRequest) ProtoMessage ¶
func (*MetaRequest) ProtoMessage()
func (*MetaRequest) ProtoReflect ¶
func (x *MetaRequest) ProtoReflect() protoreflect.Message
func (*MetaRequest) Reset ¶
func (x *MetaRequest) Reset()
func (*MetaRequest) String ¶
func (x *MetaRequest) String() string
type MetaResponse ¶
type MetaResponse struct { Status *jwt_pb.ResponseStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` Data *jwt_pb.VerifierMeta `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*MetaResponse) Descriptor
deprecated
func (*MetaResponse) Descriptor() ([]byte, []int)
Deprecated: Use MetaResponse.ProtoReflect.Descriptor instead.
func (*MetaResponse) GetData ¶
func (x *MetaResponse) GetData() *jwt_pb.VerifierMeta
func (*MetaResponse) GetStatus ¶
func (x *MetaResponse) GetStatus() *jwt_pb.ResponseStatus
func (*MetaResponse) ProtoMessage ¶
func (*MetaResponse) ProtoMessage()
func (*MetaResponse) ProtoReflect ¶
func (x *MetaResponse) ProtoReflect() protoreflect.Message
func (*MetaResponse) Reset ¶
func (x *MetaResponse) Reset()
func (*MetaResponse) String ¶
func (x *MetaResponse) String() string
type UnimplementedJwtverifierServer ¶
type UnimplementedJwtverifierServer struct { }
UnimplementedJwtverifierServer must be embedded to have forward compatible implementations.
func (UnimplementedJwtverifierServer) Meta ¶
func (UnimplementedJwtverifierServer) Meta(context.Context, *MetaRequest) (*MetaResponse, error)
func (UnimplementedJwtverifierServer) Verify ¶
func (UnimplementedJwtverifierServer) Verify(context.Context, *VerifyRequest) (*VerifyResponse, error)
type UnsafeJwtverifierServer ¶
type UnsafeJwtverifierServer interface {
// contains filtered or unexported methods
}
UnsafeJwtverifierServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to JwtverifierServer will result in compilation errors.
type VerifyRequest ¶
type VerifyRequest struct { Token *jwt_pb.Token `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` //要校验的token CheckMatchSub string `protobuf:"bytes,2,opt,name=check_match_sub,json=checkMatchSub,proto3" json:"check_match_sub,omitempty"` //校验sub是否符合这个字段填写的值 CheckMatchallAud []string `protobuf:"bytes,3,rep,name=check_matchall_aud,json=checkMatchallAud,proto3" json:"check_matchall_aud,omitempty"` // 校验token的aud是不是包含这个字段中指定的值 CheckMatchanyAud []string `protobuf:"bytes,4,rep,name=check_matchany_aud,json=checkMatchanyAud,proto3" json:"check_matchany_aud,omitempty"` // 校验token的aud是不是包含这个字段中指定的值 CheckNotmatchAud []string `protobuf:"bytes,5,rep,name=check_notmatch_aud,json=checkNotmatchAud,proto3" json:"check_notmatch_aud,omitempty"` // 校验token的aud是不是包含这个字段中指定的值 CheckMatchIss []string `protobuf:"bytes,6,rep,name=check_match_iss,json=checkMatchIss,proto3" json:"check_match_iss,omitempty"` //校验token的签发人是否在这个字段给定的范围中 NotCheckRefreshTokenAud bool `` //是否校验RefreshToken中的AUD必须和对应AccessToken的一致 /* 137-byte string literal not displayed */ NotCheckRefreshTokenJti bool `` //是否校验RefreshToken中的JTI必须和对应AccessToken的一致 /* 137-byte string literal not displayed */ // contains filtered or unexported fields }
func (*VerifyRequest) Descriptor
deprecated
func (*VerifyRequest) Descriptor() ([]byte, []int)
Deprecated: Use VerifyRequest.ProtoReflect.Descriptor instead.
func (*VerifyRequest) GetCheckMatchIss ¶
func (x *VerifyRequest) GetCheckMatchIss() []string
func (*VerifyRequest) GetCheckMatchSub ¶
func (x *VerifyRequest) GetCheckMatchSub() string
func (*VerifyRequest) GetCheckMatchallAud ¶ added in v0.0.4
func (x *VerifyRequest) GetCheckMatchallAud() []string
func (*VerifyRequest) GetCheckMatchanyAud ¶ added in v0.0.4
func (x *VerifyRequest) GetCheckMatchanyAud() []string
func (*VerifyRequest) GetCheckNotmatchAud ¶ added in v0.0.4
func (x *VerifyRequest) GetCheckNotmatchAud() []string
func (*VerifyRequest) GetNotCheckRefreshTokenAud ¶
func (x *VerifyRequest) GetNotCheckRefreshTokenAud() bool
func (*VerifyRequest) GetNotCheckRefreshTokenJti ¶
func (x *VerifyRequest) GetNotCheckRefreshTokenJti() bool
func (*VerifyRequest) GetToken ¶
func (x *VerifyRequest) GetToken() *jwt_pb.Token
func (*VerifyRequest) ProtoMessage ¶
func (*VerifyRequest) ProtoMessage()
func (*VerifyRequest) ProtoReflect ¶
func (x *VerifyRequest) ProtoReflect() protoreflect.Message
func (*VerifyRequest) Reset ¶
func (x *VerifyRequest) Reset()
func (*VerifyRequest) String ¶
func (x *VerifyRequest) String() string
type VerifyResponse ¶
type VerifyResponse struct { Status *jwt_pb.ResponseStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` JwtStatus *jwt_pb.JwtStatus `protobuf:"bytes,2,opt,name=jwt_status,json=jwtStatus,proto3" json:"jwt_status,omitempty"` Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
func (*VerifyResponse) Descriptor
deprecated
func (*VerifyResponse) Descriptor() ([]byte, []int)
Deprecated: Use VerifyResponse.ProtoReflect.Descriptor instead.
func (*VerifyResponse) GetJwtStatus ¶ added in v0.0.3
func (x *VerifyResponse) GetJwtStatus() *jwt_pb.JwtStatus
func (*VerifyResponse) GetPayload ¶
func (x *VerifyResponse) GetPayload() []byte
func (*VerifyResponse) GetStatus ¶
func (x *VerifyResponse) GetStatus() *jwt_pb.ResponseStatus
func (*VerifyResponse) ProtoMessage ¶
func (*VerifyResponse) ProtoMessage()
func (*VerifyResponse) ProtoReflect ¶
func (x *VerifyResponse) ProtoReflect() protoreflect.Message
func (*VerifyResponse) Reset ¶
func (x *VerifyResponse) Reset()
func (*VerifyResponse) String ¶
func (x *VerifyResponse) String() string