authentication

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuthenticationSvc_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "AuthenticationSvc",
	HandlerType: (*AuthenticationSvcServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _AuthenticationSvc_Login_Handler,
		},
		{
			MethodName: "Refresh",
			Handler:    _AuthenticationSvc_Refresh_Handler,
		},
		{
			MethodName: "Logout",
			Handler:    _AuthenticationSvc_Logout_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "authentication.proto",
}

AuthenticationSvc_ServiceDesc is the grpc.ServiceDesc for AuthenticationSvc 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_authentication_proto protoreflect.FileDescriptor

Functions

func RegisterAuthenticationSvcServer

func RegisterAuthenticationSvcServer(s grpc.ServiceRegistrar, srv AuthenticationSvcServer)

Types

type AuthenticationSvcClient

type AuthenticationSvcClient interface {
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*Token, error)
	Refresh(ctx context.Context, in *Token, opts ...grpc.CallOption) (*Token, error)
	Logout(ctx context.Context, in *Token, opts ...grpc.CallOption) (*LogoutResponse, error)
}

AuthenticationSvcClient is the client API for AuthenticationSvc 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 AuthenticationSvcServer

type AuthenticationSvcServer interface {
	Login(context.Context, *LoginRequest) (*Token, error)
	Refresh(context.Context, *Token) (*Token, error)
	Logout(context.Context, *Token) (*LogoutResponse, error)
	// contains filtered or unexported methods
}

AuthenticationSvcServer is the server API for AuthenticationSvc service. All implementations must embed UnimplementedAuthenticationSvcServer for forward compatibility

type LoginRequest

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

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetEmail

func (x *LoginRequest) GetEmail() string

func (*LoginRequest) GetPassword

func (x *LoginRequest) GetPassword() string

func (*LoginRequest) GetUsername

func (x *LoginRequest) GetUsername() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

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

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

type LogoutResponse

type LogoutResponse struct {
	// contains filtered or unexported fields
}

func (*LogoutResponse) Descriptor deprecated

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

Deprecated: Use LogoutResponse.ProtoReflect.Descriptor instead.

func (*LogoutResponse) ProtoMessage

func (*LogoutResponse) ProtoMessage()

func (*LogoutResponse) ProtoReflect

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

func (*LogoutResponse) Reset

func (x *LogoutResponse) Reset()

func (*LogoutResponse) String

func (x *LogoutResponse) String() string

type Token

type Token struct {
	AuthenticationToken string `protobuf:"bytes,1,opt,name=authenticationToken,proto3" json:"authenticationToken,omitempty"`
	RefreshToken        string `protobuf:"bytes,2,opt,name=refreshToken,proto3" json:"refreshToken,omitempty"`
	// contains filtered or unexported fields
}

func (*Token) Descriptor deprecated

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

Deprecated: Use Token.ProtoReflect.Descriptor instead.

func (*Token) GetAuthenticationToken

func (x *Token) GetAuthenticationToken() string

func (*Token) GetRefreshToken

func (x *Token) GetRefreshToken() string

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) ProtoReflect

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

func (*Token) Reset

func (x *Token) Reset()

func (*Token) String

func (x *Token) String() string

type UnimplementedAuthenticationSvcServer

type UnimplementedAuthenticationSvcServer struct {
}

UnimplementedAuthenticationSvcServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthenticationSvcServer) Login

func (UnimplementedAuthenticationSvcServer) Logout

func (UnimplementedAuthenticationSvcServer) Refresh

type UnsafeAuthenticationSvcServer

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

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

Jump to

Keyboard shortcuts

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