proto

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Mechanism_name = map[int32]string{
		0: "UNKNOWN_MECHANISM",
		1: "PASSWORD",
		2: "OTP",
		3: "WEBAUTHN",
		4: "RECOVERY_TOKEN",
	}
	Mechanism_value = map[string]int32{
		"UNKNOWN_MECHANISM": 0,
		"PASSWORD":          1,
		"OTP":               2,
		"WEBAUTHN":          3,
		"RECOVERY_TOKEN":    4,
	}
)

Enum value maps for Mechanism.

View Source
var (
	Response_Status_name = map[int32]string{
		0: "STATUS_UNKNOWN",
		1: "STATUS_ERROR",
		2: "STATUS_INSUFFICIENT_CREDENTIALS",
		3: "STATUS_OK",
	}
	Response_Status_value = map[string]int32{
		"STATUS_UNKNOWN":                  0,
		"STATUS_ERROR":                    1,
		"STATUS_INSUFFICIENT_CREDENTIALS": 2,
		"STATUS_OK":                       3,
	}
)

Enum value maps for Response_Status.

View Source
var File_authn_proto_authn_proto protoreflect.FileDescriptor

Functions

func RegisterAuthNServer

func RegisterAuthNServer(s *grpc.Server, srv AuthNServer)

Types

type AuthNClient

type AuthNClient interface {
	Authenticate(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}

AuthNClient is the client API for AuthN 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 NewAuthNClient

func NewAuthNClient(cc grpc.ClientConnInterface) AuthNClient

type AuthNServer

type AuthNServer interface {
	Authenticate(context.Context, *Request) (*Response, error)
	// contains filtered or unexported methods
}

AuthNServer is the server API for AuthN service. All implementations must embed UnimplementedAuthNServer for forward compatibility

type ClientInfo

type ClientInfo struct {
	DeviceInfo *proto.DeviceInfo `protobuf:"bytes,1,opt,name=device_info,json=deviceInfo,proto3" json:"device_info,omitempty"`
	RemoteZone string            `protobuf:"bytes,2,opt,name=remote_zone,json=remoteZone,proto3" json:"remote_zone,omitempty"`
	Unknown    bool              `protobuf:"varint,3,opt,name=unknown,proto3" json:"unknown,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientInfo) Descriptor deprecated

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

Deprecated: Use ClientInfo.ProtoReflect.Descriptor instead.

func (*ClientInfo) GetDeviceInfo

func (x *ClientInfo) GetDeviceInfo() *proto.DeviceInfo

func (*ClientInfo) GetRemoteZone

func (x *ClientInfo) GetRemoteZone() string

func (*ClientInfo) GetUnknown

func (x *ClientInfo) GetUnknown() bool

func (*ClientInfo) ProtoMessage

func (*ClientInfo) ProtoMessage()

func (*ClientInfo) ProtoReflect

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

func (*ClientInfo) Reset

func (x *ClientInfo) Reset()

func (*ClientInfo) String

func (x *ClientInfo) String() string

type Log

type Log struct {
	UserId          string                 `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Username        string                 `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Service         string                 `protobuf:"bytes,3,opt,name=service,proto3" json:"service,omitempty"`
	SessionId       string                 `protobuf:"bytes,4,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	Mechanism       Mechanism              `protobuf:"varint,5,opt,name=mechanism,proto3,enum=authn.Mechanism" json:"mechanism,omitempty"`
	AuthenticatorId *proto.AuthenticatorID `protobuf:"bytes,6,opt,name=authenticator_id,json=authenticatorId,proto3" json:"authenticator_id,omitempty"`
	ClientInfo      *ClientInfo            `protobuf:"bytes,7,opt,name=client_info,json=clientInfo,proto3" json:"client_info,omitempty"`
	// contains filtered or unexported fields
}

func (*Log) Descriptor deprecated

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

Deprecated: Use Log.ProtoReflect.Descriptor instead.

func (*Log) GetAuthenticatorId

func (x *Log) GetAuthenticatorId() *proto.AuthenticatorID

func (*Log) GetClientInfo

func (x *Log) GetClientInfo() *ClientInfo

func (*Log) GetMechanism

func (x *Log) GetMechanism() Mechanism

func (*Log) GetService

func (x *Log) GetService() string

func (*Log) GetSessionId

func (x *Log) GetSessionId() string

func (*Log) GetUserId

func (x *Log) GetUserId() string

func (*Log) GetUsername

func (x *Log) GetUsername() string

func (*Log) ProtoMessage

func (*Log) ProtoMessage()

func (*Log) ProtoReflect

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

func (*Log) Reset

func (x *Log) Reset()

func (*Log) String

func (x *Log) String() string

type Mechanism

type Mechanism int32
const (
	Mechanism_UNKNOWN_MECHANISM Mechanism = 0
	Mechanism_PASSWORD          Mechanism = 1
	Mechanism_OTP               Mechanism = 2
	Mechanism_WEBAUTHN          Mechanism = 3
	Mechanism_RECOVERY_TOKEN    Mechanism = 4
)

func (Mechanism) Descriptor

func (Mechanism) Descriptor() protoreflect.EnumDescriptor

func (Mechanism) Enum

func (x Mechanism) Enum() *Mechanism

func (Mechanism) EnumDescriptor deprecated

func (Mechanism) EnumDescriptor() ([]byte, []int)

Deprecated: Use Mechanism.Descriptor instead.

func (Mechanism) Number

func (x Mechanism) Number() protoreflect.EnumNumber

func (Mechanism) String

func (x Mechanism) String() string

func (Mechanism) Type

type Request

type Request struct {
	Service                  string            `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	Username                 string            `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Password                 string            `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	Mechanism                Mechanism         `protobuf:"varint,4,opt,name=mechanism,proto3,enum=authn.Mechanism" json:"mechanism,omitempty"`
	Otp                      string            `protobuf:"bytes,6,opt,name=otp,proto3" json:"otp,omitempty"`
	WebauthnSessionId        string            `protobuf:"bytes,7,opt,name=webauthn_session_id,json=webauthnSessionId,proto3" json:"webauthn_session_id,omitempty"`
	WebauthnEncodedAssertion string            `` /* 135-byte string literal not displayed */
	DeviceInfo               *proto.DeviceInfo `protobuf:"bytes,9,opt,name=device_info,json=deviceInfo,proto3" json:"device_info,omitempty"`
	RemoteAddr               string            `protobuf:"bytes,10,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"`
	SessionId                string            `protobuf:"bytes,11,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetDeviceInfo

func (x *Request) GetDeviceInfo() *proto.DeviceInfo

func (*Request) GetMechanism

func (x *Request) GetMechanism() Mechanism

func (*Request) GetOtp

func (x *Request) GetOtp() string

func (*Request) GetPassword

func (x *Request) GetPassword() string

func (*Request) GetRemoteAddr

func (x *Request) GetRemoteAddr() string

func (*Request) GetService

func (x *Request) GetService() string

func (*Request) GetSessionId

func (x *Request) GetSessionId() string

func (*Request) GetUsername

func (x *Request) GetUsername() string

func (*Request) GetWebAuthnAssertion

func (r *Request) GetWebAuthnAssertion() (*protocol.ParsedCredentialAssertionData, error)

func (*Request) GetWebauthnEncodedAssertion

func (x *Request) GetWebauthnEncodedAssertion() string

func (*Request) GetWebauthnSessionId

func (x *Request) GetWebauthnSessionId() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	Status Response_Status `protobuf:"varint,1,opt,name=status,proto3,enum=authn.Response_Status" json:"status,omitempty"`
	// Only set on STATUS_INSUFFICIENT_CREDENTIALS.
	AvailableMechanisms []Mechanism `` /* 147-byte string literal not displayed */
	// Only set on STATUS_INSUFFICIENT_CREDENTIALS.
	WebauthnSessionId        string `protobuf:"bytes,3,opt,name=webauthn_session_id,json=webauthnSessionId,proto3" json:"webauthn_session_id,omitempty"`
	WebauthnEncodedAssertion string `` /* 135-byte string literal not displayed */
	// Only set on STATUS_OK.
	Mechanism       Mechanism              `protobuf:"varint,5,opt,name=mechanism,proto3,enum=authn.Mechanism" json:"mechanism,omitempty"`
	AuthenticatorId *proto.AuthenticatorID `protobuf:"bytes,6,opt,name=authenticator_id,json=authenticatorId,proto3" json:"authenticator_id,omitempty"`
	UserId          string                 `protobuf:"bytes,7,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	UserInfo        *proto.UserInfo        `protobuf:"bytes,8,opt,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"`
	ForcedWorkflows []string               `protobuf:"bytes,9,rep,name=forced_workflows,json=forcedWorkflows,proto3" json:"forced_workflows,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetAuthenticatorId

func (x *Response) GetAuthenticatorId() *proto.AuthenticatorID

func (*Response) GetAvailableMechanisms

func (x *Response) GetAvailableMechanisms() []Mechanism

func (*Response) GetForcedWorkflows

func (x *Response) GetForcedWorkflows() []string

func (*Response) GetMechanism

func (x *Response) GetMechanism() Mechanism

func (*Response) GetStatus

func (x *Response) GetStatus() Response_Status

func (*Response) GetUserId

func (x *Response) GetUserId() string

func (*Response) GetUserInfo

func (x *Response) GetUserInfo() *proto.UserInfo

func (*Response) GetWebauthnEncodedAssertion

func (x *Response) GetWebauthnEncodedAssertion() string

func (*Response) GetWebauthnSessionId

func (x *Response) GetWebauthnSessionId() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

func (*Response) WithWebAuthnAssertion

func (r *Response) WithWebAuthnAssertion(assertionData *protocol.CredentialAssertion) *Response

type Response_Status

type Response_Status int32
const (
	Response_STATUS_UNKNOWN                  Response_Status = 0
	Response_STATUS_ERROR                    Response_Status = 1
	Response_STATUS_INSUFFICIENT_CREDENTIALS Response_Status = 2
	Response_STATUS_OK                       Response_Status = 3
)

func (Response_Status) Descriptor

func (Response_Status) Enum

func (x Response_Status) Enum() *Response_Status

func (Response_Status) EnumDescriptor deprecated

func (Response_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Response_Status.Descriptor instead.

func (Response_Status) Number

func (Response_Status) String

func (x Response_Status) String() string

func (Response_Status) Type

type UnimplementedAuthNServer

type UnimplementedAuthNServer struct {
}

UnimplementedAuthNServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthNServer) Authenticate

type UnsafeAuthNServer

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

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

Jump to

Keyboard shortcuts

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