definition

package
v0.0.0-...-bb45038 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Name = "authentication.v1"
)

Variables

View Source
var AuthenticationV1_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "authentication.AuthenticationV1",
	HandlerType: (*AuthenticationV1Server)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Validate",
			Handler:    _AuthenticationV1_Validate_Handler,
		},
		{
			MethodName: "CreateToken",
			Handler:    _AuthenticationV1_CreateToken_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "integrations/authentication/v1/definition/definition.proto",
}

AuthenticationV1_ServiceDesc is the grpc.ServiceDesc for AuthenticationV1 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_integrations_authentication_v1_definition_definition_proto protoreflect.FileDescriptor

Functions

func RegisterAuthenticationV1Server

func RegisterAuthenticationV1Server(s grpc.ServiceRegistrar, srv AuthenticationV1Server)

Types

type AuthenticationV1Client

type AuthenticationV1Client interface {
	// Validate and ensure that Authentication details are valid returns information about the user
	Validate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*ValidateResponse, error)
	// CreateToken creates a token for the specified user
	CreateToken(ctx context.Context, in *CreateTokenRequest, opts ...grpc.CallOption) (*CreateTokenResponse, error)
}

AuthenticationV1Client is the client API for AuthenticationV1 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 AuthenticationV1Server

type AuthenticationV1Server interface {
	// Validate and ensure that Authentication details are valid returns information about the user
	Validate(context.Context, *ValidateRequest) (*ValidateResponse, error)
	// CreateToken creates a token for the specified user
	CreateToken(context.Context, *CreateTokenRequest) (*CreateTokenResponse, error)
	// contains filtered or unexported methods
}

AuthenticationV1Server is the server API for AuthenticationV1 service. All implementations must embed UnimplementedAuthenticationV1Server for forward compatibility

type CreateTokenRequest

type CreateTokenRequest struct {

	// lifetime specifies the lifetime of the token as duration. Defaults to 1 hour
	Lifetime *durationpb.Duration `protobuf:"bytes,1,opt,name=lifetime,proto3,oneof" json:"lifetime,omitempty"`
	// user specify the User for which token should be created. By default, the default user is used (root in most cases)
	User *string `protobuf:"bytes,2,opt,name=user,proto3,oneof" json:"user,omitempty"`
	// contains filtered or unexported fields
}

CreateTokenRequest defines request for AuthenticationV1 CreateToken Request

func (*CreateTokenRequest) Descriptor deprecated

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

Deprecated: Use CreateTokenRequest.ProtoReflect.Descriptor instead.

func (*CreateTokenRequest) GetLifetime

func (x *CreateTokenRequest) GetLifetime() *durationpb.Duration

func (*CreateTokenRequest) GetUser

func (x *CreateTokenRequest) GetUser() string

func (*CreateTokenRequest) ProtoMessage

func (*CreateTokenRequest) ProtoMessage()

func (*CreateTokenRequest) ProtoReflect

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

func (*CreateTokenRequest) Reset

func (x *CreateTokenRequest) Reset()

func (*CreateTokenRequest) String

func (x *CreateTokenRequest) String() string

type CreateTokenResponse

type CreateTokenResponse struct {

	// lifetime specify the lifetime of the token as the duration
	Lifetime *durationpb.Duration `protobuf:"bytes,1,opt,name=lifetime,proto3" json:"lifetime,omitempty"`
	// user returns the User used in the Token
	User string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	// token returns the Token as a string
	Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

CreateTokenResponse defines response for AuthenticationV1 CreateToken Request

func (*CreateTokenResponse) Descriptor deprecated

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

Deprecated: Use CreateTokenResponse.ProtoReflect.Descriptor instead.

func (*CreateTokenResponse) GetLifetime

func (x *CreateTokenResponse) GetLifetime() *durationpb.Duration

func (*CreateTokenResponse) GetToken

func (x *CreateTokenResponse) GetToken() string

func (*CreateTokenResponse) GetUser

func (x *CreateTokenResponse) GetUser() string

func (*CreateTokenResponse) ProtoMessage

func (*CreateTokenResponse) ProtoMessage()

func (*CreateTokenResponse) ProtoReflect

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

func (*CreateTokenResponse) Reset

func (x *CreateTokenResponse) Reset()

func (*CreateTokenResponse) String

func (x *CreateTokenResponse) String() string

type UnimplementedAuthenticationV1Server

type UnimplementedAuthenticationV1Server struct {
}

UnimplementedAuthenticationV1Server must be embedded to have forward compatible implementations.

func (UnimplementedAuthenticationV1Server) CreateToken

func (UnimplementedAuthenticationV1Server) Validate

type UnsafeAuthenticationV1Server

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

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

type ValidateRequest

type ValidateRequest struct {

	// token specifies a token extracted from the request or used currently
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

ValidateRequest defines request for AuthenticationV1 Validate Request

func (*ValidateRequest) Descriptor deprecated

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

Deprecated: Use ValidateRequest.ProtoReflect.Descriptor instead.

func (*ValidateRequest) GetToken

func (x *ValidateRequest) GetToken() string

func (*ValidateRequest) ProtoMessage

func (*ValidateRequest) ProtoMessage()

func (*ValidateRequest) ProtoReflect

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

func (*ValidateRequest) Reset

func (x *ValidateRequest) Reset()

func (*ValidateRequest) String

func (x *ValidateRequest) String() string

type ValidateResponse

type ValidateResponse struct {

	// is_valid returns information about the validity of the token
	IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"`
	// message message for the validation phase
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// details returns token details if the token is valid
	Details *ValidateResponseDetails `protobuf:"bytes,3,opt,name=details,proto3,oneof" json:"details,omitempty"`
	// contains filtered or unexported fields
}

ValidateResponse defines response for AuthenticationV1 Validate Request

func (*ValidateResponse) Descriptor deprecated

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

Deprecated: Use ValidateResponse.ProtoReflect.Descriptor instead.

func (*ValidateResponse) GetDetails

func (x *ValidateResponse) GetDetails() *ValidateResponseDetails

func (*ValidateResponse) GetIsValid

func (x *ValidateResponse) GetIsValid() bool

func (*ValidateResponse) GetMessage

func (x *ValidateResponse) GetMessage() string

func (*ValidateResponse) ProtoMessage

func (*ValidateResponse) ProtoMessage()

func (*ValidateResponse) ProtoReflect

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

func (*ValidateResponse) Reset

func (x *ValidateResponse) Reset()

func (*ValidateResponse) String

func (x *ValidateResponse) String() string

type ValidateResponseDetails

type ValidateResponseDetails struct {

	// lifetime specify the lifetime of the token
	Lifetime *durationpb.Duration `protobuf:"bytes,1,opt,name=lifetime,proto3" json:"lifetime,omitempty"`
	// user returns the User used in the Token. If a user is not specified, `root` is returned
	User string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

ValidateResponseDetails defines optional response for AuthenticationV1 Validate Request. Returned only if the Token provided in the request is valid.

func (*ValidateResponseDetails) Descriptor deprecated

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

Deprecated: Use ValidateResponseDetails.ProtoReflect.Descriptor instead.

func (*ValidateResponseDetails) GetLifetime

func (x *ValidateResponseDetails) GetLifetime() *durationpb.Duration

func (*ValidateResponseDetails) GetUser

func (x *ValidateResponseDetails) GetUser() string

func (*ValidateResponseDetails) ProtoMessage

func (*ValidateResponseDetails) ProtoMessage()

func (*ValidateResponseDetails) ProtoReflect

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

func (*ValidateResponseDetails) Reset

func (x *ValidateResponseDetails) Reset()

func (*ValidateResponseDetails) String

func (x *ValidateResponseDetails) String() string

Jump to

Keyboard shortcuts

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