jwtverifier_pb

package
v2.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pbschema_jwtverifier_proto protoreflect.FileDescriptor
View Source
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.

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) Verify

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

func (x *VerifyRequest) GetCheckMatchallAud() []string

func (*VerifyRequest) GetCheckMatchanyAud

func (x *VerifyRequest) GetCheckMatchanyAud() []string

func (*VerifyRequest) GetCheckNotmatchAud

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL