Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
- type AuthServiceClient
- type AuthServiceServer
- type AuthService_GetValidationKeySetClient
- type AuthService_GetValidationKeySetServer
- type AuthService_TranslateAccessTokenClient
- type AuthService_TranslateAccessTokenServer
- type GetAccessTokenRequest
- func (*GetAccessTokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetAccessTokenRequest) GetRefreshToken() string
- func (*GetAccessTokenRequest) ProtoMessage()
- func (x *GetAccessTokenRequest) ProtoReflect() protoreflect.Message
- func (x *GetAccessTokenRequest) Reset()
- func (x *GetAccessTokenRequest) String() string
- type GetAccessTokenResponse
- func (*GetAccessTokenResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetAccessTokenResponse) GetAccessToken() string
- func (*GetAccessTokenResponse) ProtoMessage()
- func (x *GetAccessTokenResponse) ProtoReflect() protoreflect.Message
- func (x *GetAccessTokenResponse) Reset()
- func (x *GetAccessTokenResponse) String() string
- type Jwk
- func (*Jwk) Descriptor() ([]byte, []int)deprecated
- func (x *Jwk) GetAlg() string
- func (x *Jwk) GetKey() *anypb.Any
- func (x *Jwk) GetKid() string
- func (x *Jwk) GetKty() string
- func (*Jwk) ProtoMessage()
- func (x *Jwk) ProtoReflect() protoreflect.Message
- func (x *Jwk) Reset()
- func (x *Jwk) String() string
- type SignInRequest
- func (*SignInRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SignInRequest) GetEmail() string
- func (x *SignInRequest) GetPassword() string
- func (*SignInRequest) ProtoMessage()
- func (x *SignInRequest) ProtoReflect() protoreflect.Message
- func (x *SignInRequest) Reset()
- func (x *SignInRequest) String() string
- type SignInResponse
- type SignOutRequest
- type TranslateAccessTokenRequest
- func (*TranslateAccessTokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TranslateAccessTokenRequest) GetMetadata() map[string]string
- func (x *TranslateAccessTokenRequest) GetOpaqueAccessToken() string
- func (*TranslateAccessTokenRequest) ProtoMessage()
- func (x *TranslateAccessTokenRequest) ProtoReflect() protoreflect.Message
- func (x *TranslateAccessTokenRequest) Reset()
- func (x *TranslateAccessTokenRequest) String() string
- type TranslateAccessTokenResponse
- func (*TranslateAccessTokenResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TranslateAccessTokenResponse) GetAccessToken() string
- func (x *TranslateAccessTokenResponse) GetMetadata() map[string]string
- func (*TranslateAccessTokenResponse) ProtoMessage()
- func (x *TranslateAccessTokenResponse) ProtoReflect() protoreflect.Message
- func (x *TranslateAccessTokenResponse) Reset()
- func (x *TranslateAccessTokenResponse) String() string
- type UnimplementedAuthServiceServer
- func (UnimplementedAuthServiceServer) GetAccessToken(context.Context, *GetAccessTokenRequest) (*GetAccessTokenResponse, error)
- func (UnimplementedAuthServiceServer) GetValidationKeySet(*emptypb.Empty, AuthService_GetValidationKeySetServer) error
- func (UnimplementedAuthServiceServer) SignIn(context.Context, *SignInRequest) (*SignInResponse, error)
- func (UnimplementedAuthServiceServer) SignOut(context.Context, *SignOutRequest) (*emptypb.Empty, error)
- func (UnimplementedAuthServiceServer) TranslateAccessToken(AuthService_TranslateAccessTokenServer) error
- type UnsafeAuthServiceServer
Constants ¶
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 ¶
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)
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.
func NewAuthServiceClient ¶
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient
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) ProtoMessage ¶
func (*Jwk) ProtoMessage()
func (*Jwk) ProtoReflect ¶
func (x *Jwk) ProtoReflect() protoreflect.Message
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 (x *TranslateAccessTokenRequest) ProtoReflect() protoreflect.Message
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 (x *TranslateAccessTokenResponse) ProtoReflect() protoreflect.Message
func (*TranslateAccessTokenResponse) Reset ¶
func (x *TranslateAccessTokenResponse) Reset()
func (*TranslateAccessTokenResponse) String ¶
func (x *TranslateAccessTokenResponse) String() string
type UnimplementedAuthServiceServer ¶
type UnimplementedAuthServiceServer struct { }
UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthServiceServer) GetAccessToken ¶
func (UnimplementedAuthServiceServer) GetAccessToken(context.Context, *GetAccessTokenRequest) (*GetAccessTokenResponse, error)
func (UnimplementedAuthServiceServer) GetValidationKeySet ¶
func (UnimplementedAuthServiceServer) GetValidationKeySet(*emptypb.Empty, AuthService_GetValidationKeySetServer) error
func (UnimplementedAuthServiceServer) SignIn ¶
func (UnimplementedAuthServiceServer) SignIn(context.Context, *SignInRequest) (*SignInResponse, error)
func (UnimplementedAuthServiceServer) SignOut ¶
func (UnimplementedAuthServiceServer) SignOut(context.Context, *SignOutRequest) (*emptypb.Empty, error)
func (UnimplementedAuthServiceServer) TranslateAccessToken ¶
func (UnimplementedAuthServiceServer) TranslateAccessToken(AuthService_TranslateAccessTokenServer) error
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.