Documentation ¶
Index ¶
- Variables
- func RegisterJwtServer(s grpc.ServiceRegistrar, srv JwtServer)
- type AccessTokenRequest
- func (*AccessTokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AccessTokenRequest) GetAccessToken() string
- func (*AccessTokenRequest) ProtoMessage()
- func (x *AccessTokenRequest) ProtoReflect() protoreflect.Message
- func (x *AccessTokenRequest) Reset()
- func (x *AccessTokenRequest) String() string
- type CreateTokensRequest
- func (*CreateTokensRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateTokensRequest) GetDomain() string
- func (x *CreateTokensRequest) GetScopes() string
- func (x *CreateTokensRequest) GetUserId() string
- func (*CreateTokensRequest) ProtoMessage()
- func (x *CreateTokensRequest) ProtoReflect() protoreflect.Message
- func (x *CreateTokensRequest) Reset()
- func (x *CreateTokensRequest) String() string
- type CreateTokensResp
- func (*CreateTokensResp) Descriptor() ([]byte, []int)deprecated
- func (x *CreateTokensResp) GetAccessToken() string
- func (x *CreateTokensResp) GetExpiresAccessAt() int64
- func (x *CreateTokensResp) GetExpiresRefreshAt() int64
- func (x *CreateTokensResp) GetRefreshToken() string
- func (x *CreateTokensResp) GetTokenType() string
- func (*CreateTokensResp) ProtoMessage()
- func (x *CreateTokensResp) ProtoReflect() protoreflect.Message
- func (x *CreateTokensResp) Reset()
- func (x *CreateTokensResp) String() string
- type JwtClient
- type JwtServer
- type RefreshTokenRequest
- func (*RefreshTokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RefreshTokenRequest) GetRefreshToken() string
- func (*RefreshTokenRequest) ProtoMessage()
- func (x *RefreshTokenRequest) ProtoReflect() protoreflect.Message
- func (x *RefreshTokenRequest) Reset()
- func (x *RefreshTokenRequest) String() string
- type SuccessResponse
- type UnimplementedJwtServer
- func (UnimplementedJwtServer) CreateTokens(context.Context, *CreateTokensRequest) (*CreateTokensResp, error)
- func (UnimplementedJwtServer) Logout(context.Context, *AccessTokenRequest) (*SuccessResponse, error)
- func (UnimplementedJwtServer) LogoutAll(context.Context, *AccessTokenRequest) (*SuccessResponse, error)
- func (UnimplementedJwtServer) RefreshToken(context.Context, *RefreshTokenRequest) (*CreateTokensResp, error)
- func (UnimplementedJwtServer) VerifyAccessToken(context.Context, *VerifyTokenRequest) (*VerifyTokenResponse, error)
- type UnsafeJwtServer
- type VerifyTokenRequest
- func (*VerifyTokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *VerifyTokenRequest) GetAccessToken() string
- func (*VerifyTokenRequest) ProtoMessage()
- func (x *VerifyTokenRequest) ProtoReflect() protoreflect.Message
- func (x *VerifyTokenRequest) Reset()
- func (x *VerifyTokenRequest) String() string
- type VerifyTokenResponse
- func (*VerifyTokenResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VerifyTokenResponse) GetDomainId() string
- func (x *VerifyTokenResponse) GetUserId() string
- func (x *VerifyTokenResponse) GetValid() bool
- func (*VerifyTokenResponse) ProtoMessage()
- func (x *VerifyTokenResponse) ProtoReflect() protoreflect.Message
- func (x *VerifyTokenResponse) Reset()
- func (x *VerifyTokenResponse) String() string
Constants ¶
This section is empty.
Variables ¶
var File_proto_jwt_jwt_proto protoreflect.FileDescriptor
var Jwt_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.Jwt", HandlerType: (*JwtServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateTokens", Handler: _Jwt_CreateTokens_Handler, }, { MethodName: "VerifyAccessToken", Handler: _Jwt_VerifyAccessToken_Handler, }, { MethodName: "RefreshToken", Handler: _Jwt_RefreshToken_Handler, }, { MethodName: "Logout", Handler: _Jwt_Logout_Handler, }, { MethodName: "LogoutAll", Handler: _Jwt_LogoutAll_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/jwt/jwt.proto", }
Jwt_ServiceDesc is the grpc.ServiceDesc for Jwt service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterJwtServer ¶
func RegisterJwtServer(s grpc.ServiceRegistrar, srv JwtServer)
Types ¶
type AccessTokenRequest ¶
type AccessTokenRequest struct { AccessToken string `protobuf:"bytes,1,opt,name=accessToken,proto3" json:"accessToken,omitempty"` // contains filtered or unexported fields }
func (*AccessTokenRequest) Descriptor
deprecated
func (*AccessTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use AccessTokenRequest.ProtoReflect.Descriptor instead.
func (*AccessTokenRequest) GetAccessToken ¶
func (x *AccessTokenRequest) GetAccessToken() string
func (*AccessTokenRequest) ProtoMessage ¶
func (*AccessTokenRequest) ProtoMessage()
func (*AccessTokenRequest) ProtoReflect ¶
func (x *AccessTokenRequest) ProtoReflect() protoreflect.Message
func (*AccessTokenRequest) Reset ¶
func (x *AccessTokenRequest) Reset()
func (*AccessTokenRequest) String ¶
func (x *AccessTokenRequest) String() string
type CreateTokensRequest ¶
type CreateTokensRequest struct { UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` Scopes string `protobuf:"bytes,2,opt,name=scopes,proto3" json:"scopes,omitempty"` Domain string `protobuf:"bytes,3,opt,name=domain,proto3" json:"domain,omitempty"` // contains filtered or unexported fields }
func (*CreateTokensRequest) Descriptor
deprecated
func (*CreateTokensRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateTokensRequest.ProtoReflect.Descriptor instead.
func (*CreateTokensRequest) GetDomain ¶
func (x *CreateTokensRequest) GetDomain() string
func (*CreateTokensRequest) GetScopes ¶
func (x *CreateTokensRequest) GetScopes() string
func (*CreateTokensRequest) GetUserId ¶
func (x *CreateTokensRequest) GetUserId() string
func (*CreateTokensRequest) ProtoMessage ¶
func (*CreateTokensRequest) ProtoMessage()
func (*CreateTokensRequest) ProtoReflect ¶
func (x *CreateTokensRequest) ProtoReflect() protoreflect.Message
func (*CreateTokensRequest) Reset ¶
func (x *CreateTokensRequest) Reset()
func (*CreateTokensRequest) String ¶
func (x *CreateTokensRequest) String() string
type CreateTokensResp ¶
type CreateTokensResp struct { TokenType string `protobuf:"bytes,1,opt,name=tokenType,proto3" json:"tokenType,omitempty"` AccessToken string `protobuf:"bytes,2,opt,name=accessToken,proto3" json:"accessToken,omitempty"` ExpiresAccessAt int64 `protobuf:"varint,3,opt,name=expiresAccessAt,proto3" json:"expiresAccessAt,omitempty"` RefreshToken string `protobuf:"bytes,4,opt,name=refreshToken,proto3" json:"refreshToken,omitempty"` ExpiresRefreshAt int64 `protobuf:"varint,5,opt,name=expiresRefreshAt,proto3" json:"expiresRefreshAt,omitempty"` // contains filtered or unexported fields }
func (*CreateTokensResp) Descriptor
deprecated
func (*CreateTokensResp) Descriptor() ([]byte, []int)
Deprecated: Use CreateTokensResp.ProtoReflect.Descriptor instead.
func (*CreateTokensResp) GetAccessToken ¶
func (x *CreateTokensResp) GetAccessToken() string
func (*CreateTokensResp) GetExpiresAccessAt ¶
func (x *CreateTokensResp) GetExpiresAccessAt() int64
func (*CreateTokensResp) GetExpiresRefreshAt ¶
func (x *CreateTokensResp) GetExpiresRefreshAt() int64
func (*CreateTokensResp) GetRefreshToken ¶
func (x *CreateTokensResp) GetRefreshToken() string
func (*CreateTokensResp) GetTokenType ¶
func (x *CreateTokensResp) GetTokenType() string
func (*CreateTokensResp) ProtoMessage ¶
func (*CreateTokensResp) ProtoMessage()
func (*CreateTokensResp) ProtoReflect ¶
func (x *CreateTokensResp) ProtoReflect() protoreflect.Message
func (*CreateTokensResp) Reset ¶
func (x *CreateTokensResp) Reset()
func (*CreateTokensResp) String ¶
func (x *CreateTokensResp) String() string
type JwtClient ¶
type JwtClient interface { CreateTokens(ctx context.Context, in *CreateTokensRequest, opts ...grpc.CallOption) (*CreateTokensResp, error) VerifyAccessToken(ctx context.Context, in *VerifyTokenRequest, opts ...grpc.CallOption) (*VerifyTokenResponse, error) RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*CreateTokensResp, error) Logout(ctx context.Context, in *AccessTokenRequest, opts ...grpc.CallOption) (*SuccessResponse, error) LogoutAll(ctx context.Context, in *AccessTokenRequest, opts ...grpc.CallOption) (*SuccessResponse, error) }
JwtClient is the client API for Jwt 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 NewJwtClient ¶
func NewJwtClient(cc grpc.ClientConnInterface) JwtClient
type JwtServer ¶
type JwtServer interface { CreateTokens(context.Context, *CreateTokensRequest) (*CreateTokensResp, error) VerifyAccessToken(context.Context, *VerifyTokenRequest) (*VerifyTokenResponse, error) RefreshToken(context.Context, *RefreshTokenRequest) (*CreateTokensResp, error) Logout(context.Context, *AccessTokenRequest) (*SuccessResponse, error) LogoutAll(context.Context, *AccessTokenRequest) (*SuccessResponse, error) // contains filtered or unexported methods }
JwtServer is the server API for Jwt service. All implementations must embed UnimplementedJwtServer for forward compatibility
type RefreshTokenRequest ¶
type RefreshTokenRequest struct { RefreshToken string `protobuf:"bytes,1,opt,name=refreshToken,proto3" json:"refreshToken,omitempty"` // contains filtered or unexported fields }
func (*RefreshTokenRequest) Descriptor
deprecated
func (*RefreshTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use RefreshTokenRequest.ProtoReflect.Descriptor instead.
func (*RefreshTokenRequest) GetRefreshToken ¶
func (x *RefreshTokenRequest) GetRefreshToken() string
func (*RefreshTokenRequest) ProtoMessage ¶
func (*RefreshTokenRequest) ProtoMessage()
func (*RefreshTokenRequest) ProtoReflect ¶
func (x *RefreshTokenRequest) ProtoReflect() protoreflect.Message
func (*RefreshTokenRequest) Reset ¶
func (x *RefreshTokenRequest) Reset()
func (*RefreshTokenRequest) String ¶
func (x *RefreshTokenRequest) String() string
type SuccessResponse ¶
type SuccessResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*SuccessResponse) Descriptor
deprecated
func (*SuccessResponse) Descriptor() ([]byte, []int)
Deprecated: Use SuccessResponse.ProtoReflect.Descriptor instead.
func (*SuccessResponse) GetSuccess ¶
func (x *SuccessResponse) GetSuccess() bool
func (*SuccessResponse) ProtoMessage ¶
func (*SuccessResponse) ProtoMessage()
func (*SuccessResponse) ProtoReflect ¶
func (x *SuccessResponse) ProtoReflect() protoreflect.Message
func (*SuccessResponse) Reset ¶
func (x *SuccessResponse) Reset()
func (*SuccessResponse) String ¶
func (x *SuccessResponse) String() string
type UnimplementedJwtServer ¶
type UnimplementedJwtServer struct { }
UnimplementedJwtServer must be embedded to have forward compatible implementations.
func (UnimplementedJwtServer) CreateTokens ¶
func (UnimplementedJwtServer) CreateTokens(context.Context, *CreateTokensRequest) (*CreateTokensResp, error)
func (UnimplementedJwtServer) Logout ¶
func (UnimplementedJwtServer) Logout(context.Context, *AccessTokenRequest) (*SuccessResponse, error)
func (UnimplementedJwtServer) LogoutAll ¶
func (UnimplementedJwtServer) LogoutAll(context.Context, *AccessTokenRequest) (*SuccessResponse, error)
func (UnimplementedJwtServer) RefreshToken ¶
func (UnimplementedJwtServer) RefreshToken(context.Context, *RefreshTokenRequest) (*CreateTokensResp, error)
func (UnimplementedJwtServer) VerifyAccessToken ¶
func (UnimplementedJwtServer) VerifyAccessToken(context.Context, *VerifyTokenRequest) (*VerifyTokenResponse, error)
type UnsafeJwtServer ¶
type UnsafeJwtServer interface {
// contains filtered or unexported methods
}
UnsafeJwtServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to JwtServer will result in compilation errors.
type VerifyTokenRequest ¶
type VerifyTokenRequest struct { AccessToken string `protobuf:"bytes,1,opt,name=accessToken,proto3" json:"accessToken,omitempty"` // contains filtered or unexported fields }
func (*VerifyTokenRequest) Descriptor
deprecated
func (*VerifyTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use VerifyTokenRequest.ProtoReflect.Descriptor instead.
func (*VerifyTokenRequest) GetAccessToken ¶
func (x *VerifyTokenRequest) GetAccessToken() string
func (*VerifyTokenRequest) ProtoMessage ¶
func (*VerifyTokenRequest) ProtoMessage()
func (*VerifyTokenRequest) ProtoReflect ¶
func (x *VerifyTokenRequest) ProtoReflect() protoreflect.Message
func (*VerifyTokenRequest) Reset ¶
func (x *VerifyTokenRequest) Reset()
func (*VerifyTokenRequest) String ¶
func (x *VerifyTokenRequest) String() string
type VerifyTokenResponse ¶
type VerifyTokenResponse struct { Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` DomainId string `protobuf:"bytes,3,opt,name=domainId,proto3" json:"domainId,omitempty"` // contains filtered or unexported fields }
func (*VerifyTokenResponse) Descriptor
deprecated
func (*VerifyTokenResponse) Descriptor() ([]byte, []int)
Deprecated: Use VerifyTokenResponse.ProtoReflect.Descriptor instead.
func (*VerifyTokenResponse) GetDomainId ¶
func (x *VerifyTokenResponse) GetDomainId() string
func (*VerifyTokenResponse) GetUserId ¶
func (x *VerifyTokenResponse) GetUserId() string
func (*VerifyTokenResponse) GetValid ¶
func (x *VerifyTokenResponse) GetValid() bool
func (*VerifyTokenResponse) ProtoMessage ¶
func (*VerifyTokenResponse) ProtoMessage()
func (*VerifyTokenResponse) ProtoReflect ¶
func (x *VerifyTokenResponse) ProtoReflect() protoreflect.Message
func (*VerifyTokenResponse) Reset ¶
func (x *VerifyTokenResponse) Reset()
func (*VerifyTokenResponse) String ¶
func (x *VerifyTokenResponse) String() string