authapi

package
v0.0.0-...-65c2b02 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Authentication_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "authapi.Authentication",
	HandlerType: (*AuthenticationServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Authenticate",
			Handler:    _Authentication_Authenticate_Handler,
		},
		{
			MethodName: "RefreshToken",
			Handler:    _Authentication_RefreshToken_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "auth.proto",
}

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

Functions

func RegisterAuthenticationServer

func RegisterAuthenticationServer(s grpc.ServiceRegistrar, srv AuthenticationServer)

Types

type AuthRequest

type AuthRequest struct {

	// Method specifies the type of authentication to use. The value is implementation specific.
	Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
	// Credentials specifies the credentials to use for authentication in a key/value fashion.
	Credentials map[string]string `` /* 163-byte string literal not displayed */
	// Agent's mode of operation, usually either managed or autonomous
	Mode string `protobuf:"bytes,3,opt,name=mode,proto3" json:"mode,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthRequest) Descriptor deprecated

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

Deprecated: Use AuthRequest.ProtoReflect.Descriptor instead.

func (*AuthRequest) GetCredentials

func (x *AuthRequest) GetCredentials() map[string]string

func (*AuthRequest) GetMethod

func (x *AuthRequest) GetMethod() string

func (*AuthRequest) GetMode

func (x *AuthRequest) GetMode() string

func (*AuthRequest) ProtoMessage

func (*AuthRequest) ProtoMessage()

func (*AuthRequest) ProtoReflect

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

func (*AuthRequest) Reset

func (x *AuthRequest) Reset()

func (*AuthRequest) String

func (x *AuthRequest) String() string

type AuthResponse

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

func (*AuthResponse) Descriptor deprecated

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

Deprecated: Use AuthResponse.ProtoReflect.Descriptor instead.

func (*AuthResponse) GetAccessToken

func (x *AuthResponse) GetAccessToken() string

func (*AuthResponse) GetRefreshToken

func (x *AuthResponse) GetRefreshToken() string

func (*AuthResponse) ProtoMessage

func (*AuthResponse) ProtoMessage()

func (*AuthResponse) ProtoReflect

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

func (*AuthResponse) Reset

func (x *AuthResponse) Reset()

func (*AuthResponse) String

func (x *AuthResponse) String() string

type AuthenticationClient

type AuthenticationClient interface {
	Authenticate(ctx context.Context, in *AuthRequest, opts ...grpc.CallOption) (*AuthResponse, error)
	RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*AuthResponse, error)
}

AuthenticationClient is the client API for Authentication 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 AuthenticationServer

type AuthenticationServer interface {
	Authenticate(context.Context, *AuthRequest) (*AuthResponse, error)
	RefreshToken(context.Context, *RefreshTokenRequest) (*AuthResponse, error)
	// contains filtered or unexported methods
}

AuthenticationServer is the server API for Authentication service. All implementations must embed UnimplementedAuthenticationServer 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 UnimplementedAuthenticationServer

type UnimplementedAuthenticationServer struct {
}

UnimplementedAuthenticationServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthenticationServer) Authenticate

func (UnimplementedAuthenticationServer) RefreshToken

type UnsafeAuthenticationServer

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

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

Jump to

Keyboard shortcuts

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