pb

package
v0.0.0-...-a6f3d4c Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 10 Imported by: 5

Documentation

Index

Constants

View Source
const (
	AuthService_SignIn_FullMethodName               = "/auth.AuthService/SignIn"
	AuthService_SignOut_FullMethodName              = "/auth.AuthService/SignOut"
	AuthService_GetAccessToken_FullMethodName       = "/auth.AuthService/GetAccessToken"
	AuthService_GetValidationKeySet_FullMethodName  = "/auth.AuthService/GetValidationKeySet"
	AuthService_TranslateAccessToken_FullMethodName = "/auth.AuthService/TranslateAccessToken"
)

Variables

View Source
var AuthService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "auth.AuthService",
	HandlerType: (*AuthServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SignIn",
			Handler:    _AuthService_SignIn_Handler,
		},
		{
			MethodName: "SignOut",
			Handler:    _AuthService_SignOut_Handler,
		},
		{
			MethodName: "GetAccessToken",
			Handler:    _AuthService_GetAccessToken_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetValidationKeySet",
			Handler:       _AuthService_GetValidationKeySet_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "TranslateAccessToken",
			Handler:       _AuthService_TranslateAccessToken_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "auth_service.proto",
}

AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_auth_service_proto protoreflect.FileDescriptor

Functions

func RegisterAuthServiceServer

func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)

Types

type AuthServiceClient

type AuthServiceClient interface {
	// Upon successful login user receives a refresh_token.
	// When it expires or is revoked user has to login again.
	SignIn(ctx context.Context, in *SignInRequest, opts ...grpc.CallOption) (*SignInResponse, error)
	// SignOut revokes user's active refresh_token.
	SignOut(ctx context.Context, in *SignOutRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Creates a new access token from a given refresh token.
	GetAccessToken(ctx context.Context, in *GetAccessTokenRequest, opts ...grpc.CallOption) (*GetAccessTokenResponse, error)
	// Returns a list of public JWKs to use to verify incoming JWTs.
	GetValidationKeySet(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (AuthService_GetValidationKeySetClient, error)
	// Requires mTLS client cert to be provided.
	// Responds with a JWT related to given opaque token.
	TranslateAccessToken(ctx context.Context, opts ...grpc.CallOption) (AuthService_TranslateAccessTokenClient, error)
}

AuthServiceClient is the client API for AuthService 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 AuthServiceServer

type AuthServiceServer interface {
	// Upon successful login user receives a refresh_token.
	// When it expires or is revoked user has to login again.
	SignIn(context.Context, *SignInRequest) (*SignInResponse, error)
	// SignOut revokes user's active refresh_token.
	SignOut(context.Context, *SignOutRequest) (*emptypb.Empty, error)
	// Creates a new access token from a given refresh token.
	GetAccessToken(context.Context, *GetAccessTokenRequest) (*GetAccessTokenResponse, error)
	// Returns a list of public JWKs to use to verify incoming JWTs.
	GetValidationKeySet(*emptypb.Empty, AuthService_GetValidationKeySetServer) error
	// Requires mTLS client cert to be provided.
	// Responds with a JWT related to given opaque token.
	TranslateAccessToken(AuthService_TranslateAccessTokenServer) error
	// contains filtered or unexported methods
}

AuthServiceServer is the server API for AuthService service. All implementations must embed UnimplementedAuthServiceServer for forward compatibility

type AuthService_GetValidationKeySetClient

type AuthService_GetValidationKeySetClient interface {
	Recv() (*Jwk, error)
	grpc.ClientStream
}

type AuthService_GetValidationKeySetServer

type AuthService_GetValidationKeySetServer interface {
	Send(*Jwk) error
	grpc.ServerStream
}

type AuthService_TranslateAccessTokenClient

type AuthService_TranslateAccessTokenClient interface {
	Send(*TranslateAccessTokenRequest) error
	Recv() (*TranslateAccessTokenResponse, error)
	grpc.ClientStream
}

type AuthService_TranslateAccessTokenServer

type AuthService_TranslateAccessTokenServer interface {
	Send(*TranslateAccessTokenResponse) error
	Recv() (*TranslateAccessTokenRequest, error)
	grpc.ServerStream
}

type GetAccessTokenRequest

type GetAccessTokenRequest struct {

	// Encoded JWT refresh token
	RefreshToken string `protobuf:"bytes,1,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAccessTokenRequest) Descriptor deprecated

func (*GetAccessTokenRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetAccessTokenRequest.ProtoReflect.Descriptor instead.

func (*GetAccessTokenRequest) GetRefreshToken

func (x *GetAccessTokenRequest) GetRefreshToken() string

func (*GetAccessTokenRequest) ProtoMessage

func (*GetAccessTokenRequest) ProtoMessage()

func (*GetAccessTokenRequest) ProtoReflect

func (x *GetAccessTokenRequest) ProtoReflect() protoreflect.Message

func (*GetAccessTokenRequest) Reset

func (x *GetAccessTokenRequest) Reset()

func (*GetAccessTokenRequest) String

func (x *GetAccessTokenRequest) String() string

type GetAccessTokenResponse

type GetAccessTokenResponse struct {

	// Encoded JWT access token
	AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAccessTokenResponse) Descriptor deprecated

func (*GetAccessTokenResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetAccessTokenResponse.ProtoReflect.Descriptor instead.

func (*GetAccessTokenResponse) GetAccessToken

func (x *GetAccessTokenResponse) GetAccessToken() string

func (*GetAccessTokenResponse) ProtoMessage

func (*GetAccessTokenResponse) ProtoMessage()

func (*GetAccessTokenResponse) ProtoReflect

func (x *GetAccessTokenResponse) ProtoReflect() protoreflect.Message

func (*GetAccessTokenResponse) Reset

func (x *GetAccessTokenResponse) Reset()

func (*GetAccessTokenResponse) String

func (x *GetAccessTokenResponse) String() string

type Jwk

type Jwk struct {

	// Key ID
	Kid string `protobuf:"bytes,1,opt,name=kid,proto3" json:"kid,omitempty"`
	// Key Type
	Kty string `protobuf:"bytes,2,opt,name=kty,proto3" json:"kty,omitempty"`
	// Key Signature Algorithm
	Alg string `protobuf:"bytes,3,opt,name=alg,proto3" json:"alg,omitempty"`
	// Field for key-specific data.
	// Eg. {n, e} for RSA or {crv, x, y} for EC.
	Key *anypb.Any `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*Jwk) Descriptor deprecated

func (*Jwk) Descriptor() ([]byte, []int)

Deprecated: Use Jwk.ProtoReflect.Descriptor instead.

func (*Jwk) GetAlg

func (x *Jwk) GetAlg() string

func (*Jwk) GetKey

func (x *Jwk) GetKey() *anypb.Any

func (*Jwk) GetKid

func (x *Jwk) GetKid() string

func (*Jwk) GetKty

func (x *Jwk) GetKty() string

func (*Jwk) ProtoMessage

func (*Jwk) ProtoMessage()

func (*Jwk) ProtoReflect

func (x *Jwk) ProtoReflect() protoreflect.Message

func (*Jwk) Reset

func (x *Jwk) Reset()

func (*Jwk) String

func (x *Jwk) String() string

type SignInRequest

type SignInRequest struct {
	Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	Email    string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

func (*SignInRequest) Descriptor deprecated

func (*SignInRequest) Descriptor() ([]byte, []int)

Deprecated: Use SignInRequest.ProtoReflect.Descriptor instead.

func (*SignInRequest) GetEmail

func (x *SignInRequest) GetEmail() string

func (*SignInRequest) GetPassword

func (x *SignInRequest) GetPassword() string

func (*SignInRequest) ProtoMessage

func (*SignInRequest) ProtoMessage()

func (*SignInRequest) ProtoReflect

func (x *SignInRequest) ProtoReflect() protoreflect.Message

func (*SignInRequest) Reset

func (x *SignInRequest) Reset()

func (*SignInRequest) String

func (x *SignInRequest) String() string

type SignInResponse

type SignInResponse struct {

	// Encoded JWT refresh token
	RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
	// contains filtered or unexported fields
}

func (*SignInResponse) Descriptor deprecated

func (*SignInResponse) Descriptor() ([]byte, []int)

Deprecated: Use SignInResponse.ProtoReflect.Descriptor instead.

func (*SignInResponse) GetRefreshToken

func (x *SignInResponse) GetRefreshToken() string

func (*SignInResponse) ProtoMessage

func (*SignInResponse) ProtoMessage()

func (*SignInResponse) ProtoReflect

func (x *SignInResponse) ProtoReflect() protoreflect.Message

func (*SignInResponse) Reset

func (x *SignInResponse) Reset()

func (*SignInResponse) String

func (x *SignInResponse) String() string

type SignOutRequest

type SignOutRequest struct {

	// Encoded JWT refresh token
	RefreshToken string `protobuf:"bytes,1,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
	// contains filtered or unexported fields
}

func (*SignOutRequest) Descriptor deprecated

func (*SignOutRequest) Descriptor() ([]byte, []int)

Deprecated: Use SignOutRequest.ProtoReflect.Descriptor instead.

func (*SignOutRequest) GetRefreshToken

func (x *SignOutRequest) GetRefreshToken() string

func (*SignOutRequest) ProtoMessage

func (*SignOutRequest) ProtoMessage()

func (*SignOutRequest) ProtoReflect

func (x *SignOutRequest) ProtoReflect() protoreflect.Message

func (*SignOutRequest) Reset

func (x *SignOutRequest) Reset()

func (*SignOutRequest) String

func (x *SignOutRequest) String() string

type TranslateAccessTokenRequest

type TranslateAccessTokenRequest struct {
	OpaqueAccessToken string            `protobuf:"bytes,1,opt,name=opaque_access_token,json=opaqueAccessToken,proto3" json:"opaque_access_token,omitempty"`
	Metadata          map[string]string `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*TranslateAccessTokenRequest) Descriptor deprecated

func (*TranslateAccessTokenRequest) Descriptor() ([]byte, []int)

Deprecated: Use TranslateAccessTokenRequest.ProtoReflect.Descriptor instead.

func (*TranslateAccessTokenRequest) GetMetadata

func (x *TranslateAccessTokenRequest) GetMetadata() map[string]string

func (*TranslateAccessTokenRequest) GetOpaqueAccessToken

func (x *TranslateAccessTokenRequest) GetOpaqueAccessToken() string

func (*TranslateAccessTokenRequest) ProtoMessage

func (*TranslateAccessTokenRequest) ProtoMessage()

func (*TranslateAccessTokenRequest) ProtoReflect

func (*TranslateAccessTokenRequest) Reset

func (x *TranslateAccessTokenRequest) Reset()

func (*TranslateAccessTokenRequest) String

func (x *TranslateAccessTokenRequest) String() string

type TranslateAccessTokenResponse

type TranslateAccessTokenResponse struct {

	// Encoded JWT access token
	AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	// Trace ID and etc.
	Metadata map[string]string `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*TranslateAccessTokenResponse) Descriptor deprecated

func (*TranslateAccessTokenResponse) Descriptor() ([]byte, []int)

Deprecated: Use TranslateAccessTokenResponse.ProtoReflect.Descriptor instead.

func (*TranslateAccessTokenResponse) GetAccessToken

func (x *TranslateAccessTokenResponse) GetAccessToken() string

func (*TranslateAccessTokenResponse) GetMetadata

func (x *TranslateAccessTokenResponse) GetMetadata() map[string]string

func (*TranslateAccessTokenResponse) ProtoMessage

func (*TranslateAccessTokenResponse) ProtoMessage()

func (*TranslateAccessTokenResponse) ProtoReflect

func (*TranslateAccessTokenResponse) Reset

func (x *TranslateAccessTokenResponse) Reset()

func (*TranslateAccessTokenResponse) String

type UnimplementedAuthServiceServer

type UnimplementedAuthServiceServer struct {
}

UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthServiceServer) GetAccessToken

func (UnimplementedAuthServiceServer) GetValidationKeySet

func (UnimplementedAuthServiceServer) SignIn

func (UnimplementedAuthServiceServer) SignOut

func (UnimplementedAuthServiceServer) TranslateAccessToken

type UnsafeAuthServiceServer

type UnsafeAuthServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthServiceServer will result in compilation errors.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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