proto

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Amr_name = map[int32]string{
		0: "none",
		1: "done",
		2: "pwd",
	}
	Amr_value = map[string]int32{
		"none": 0,
		"done": 1,
		"pwd":  2,
	}
)

Enum value maps for Amr.

View Source
var (
	Error_Code_name = map[int32]string{
		0:  "server_error",
		10: "user_not_found",
		11: "user_account_locked",
		20: "password_mismatch",
	}
	Error_Code_value = map[string]int32{
		"server_error":        0,
		"user_not_found":      10,
		"user_account_locked": 11,
		"password_mismatch":   20,
	}
)

Enum value maps for Error_Code.

View Source
var AuthenticationCoordinator_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "dyna.AuthenticationCoordinator",
	HandlerType: (*AuthenticationCoordinatorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "NextAuthentication",
			Handler:    _AuthenticationCoordinator_NextAuthentication_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/spi.proto",
}

AuthenticationCoordinator_ServiceDesc is the grpc.ServiceDesc for AuthenticationCoordinator 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_proto_spi_proto protoreflect.FileDescriptor
View Source
var PasswordAuthenticator_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "dyna.PasswordAuthenticator",
	HandlerType: (*PasswordAuthenticatorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CheckPassword",
			Handler:    _PasswordAuthenticator_CheckPassword_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/spi.proto",
}

PasswordAuthenticator_ServiceDesc is the grpc.ServiceDesc for PasswordAuthenticator 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 UserProvider_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "dyna.UserProvider",
	HandlerType: (*UserProviderServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUser",
			Handler:    _UserProvider_GetUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/spi.proto",
}

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

Functions

func RegisterAuthenticationCoordinatorServer

func RegisterAuthenticationCoordinatorServer(s grpc.ServiceRegistrar, srv AuthenticationCoordinatorServer)

func RegisterPasswordAuthenticatorServer

func RegisterPasswordAuthenticatorServer(s grpc.ServiceRegistrar, srv PasswordAuthenticatorServer)

func RegisterUserProviderServer

func RegisterUserProviderServer(s grpc.ServiceRegistrar, srv UserProviderServer)

Types

type Amr

type Amr int32

Amr is the enumeration of supported authentication methods.

const (
	// amr hasn't been assigned yet.
	Amr_none Amr = 0
	// no more authentication necessary.
	Amr_done Amr = 1
	// password authentication.
	Amr_pwd Amr = 2
)

func (Amr) Descriptor

func (Amr) Descriptor() protoreflect.EnumDescriptor

func (Amr) Enum

func (x Amr) Enum() *Amr

func (Amr) EnumDescriptor deprecated

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

Deprecated: Use Amr.Descriptor instead.

func (Amr) Number

func (x Amr) Number() protoreflect.EnumNumber

func (Amr) String

func (x Amr) String() string

func (Amr) Type

func (Amr) Type() protoreflect.EnumType

type AuthenticationCoordinatorClient

type AuthenticationCoordinatorClient interface {
	NextAuthentication(ctx context.Context, in *NextAuthenticationRequest, opts ...grpc.CallOption) (*NextAuthenticationResponse, error)
}

AuthenticationCoordinatorClient is the client API for AuthenticationCoordinator 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 AuthenticationCoordinatorServer

type AuthenticationCoordinatorServer interface {
	NextAuthentication(context.Context, *NextAuthenticationRequest) (*NextAuthenticationResponse, error)
	// contains filtered or unexported methods
}

AuthenticationCoordinatorServer is the server API for AuthenticationCoordinator service. All implementations must embed UnimplementedAuthenticationCoordinatorServer for forward compatibility

type Error

type Error struct {
	Code      Error_Code `protobuf:"varint,1,opt,name=code,proto3,enum=dyna.Error_Code" json:"code,omitempty"`
	Message   string     `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Timestamp int64      `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetCode

func (x *Error) GetCode() Error_Code

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) GetTimestamp

func (x *Error) GetTimestamp() int64

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

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

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type Error_Code

type Error_Code int32
const (
	Error_server_error        Error_Code = 0
	Error_user_not_found      Error_Code = 10
	Error_user_account_locked Error_Code = 11
	Error_password_mismatch   Error_Code = 20
)

func (Error_Code) Descriptor

func (Error_Code) Descriptor() protoreflect.EnumDescriptor

func (Error_Code) Enum

func (x Error_Code) Enum() *Error_Code

func (Error_Code) EnumDescriptor deprecated

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

Deprecated: Use Error_Code.Descriptor instead.

func (Error_Code) Number

func (x Error_Code) Number() protoreflect.EnumNumber

func (Error_Code) String

func (x Error_Code) String() string

func (Error_Code) Type

type GetUserRequest

type GetUserRequest struct {

	// Value of the user handle. Nature of the handle depends on handle type.
	Handle string `protobuf:"bytes,1,opt,name=handle,proto3" json:"handle,omitempty"`
	// Type of the user handle. The reserved value "subject" indicates handle
	// is a user subject. Common values include "email", "username", "cell", etc.
	HandleType string `protobuf:"bytes,2,opt,name=handleType,proto3" json:"handleType,omitempty"`
	// Names of the requested claims to be included in the response. If empty, only
	// return public user data.
	Claims []string `protobuf:"bytes,3,rep,name=claims,proto3" json:"claims,omitempty"`
	// Preferred locales of the claims in the order of preference.
	ClaimsLocales []string `protobuf:"bytes,4,rep,name=claimsLocales,proto3" json:"claimsLocales,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserRequest) Descriptor deprecated

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

Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.

func (*GetUserRequest) GetClaims

func (x *GetUserRequest) GetClaims() []string

func (*GetUserRequest) GetClaimsLocales added in v0.3.0

func (x *GetUserRequest) GetClaimsLocales() []string

func (*GetUserRequest) GetHandle

func (x *GetUserRequest) GetHandle() string

func (*GetUserRequest) GetHandleType

func (x *GetUserRequest) GetHandleType() string

func (*GetUserRequest) ProtoMessage

func (*GetUserRequest) ProtoMessage()

func (*GetUserRequest) ProtoReflect

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

func (*GetUserRequest) Reset

func (x *GetUserRequest) Reset()

func (*GetUserRequest) String

func (x *GetUserRequest) String() string

type GetUserResponse

type GetUserResponse struct {
	User  *User  `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserResponse) Descriptor deprecated

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

Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.

func (*GetUserResponse) GetError

func (x *GetUserResponse) GetError() *Error

func (*GetUserResponse) GetUser

func (x *GetUserResponse) GetUser() *User

func (*GetUserResponse) ProtoMessage

func (*GetUserResponse) ProtoMessage()

func (*GetUserResponse) ProtoReflect

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

func (*GetUserResponse) Reset

func (x *GetUserResponse) Reset()

func (*GetUserResponse) String

func (x *GetUserResponse) String() string

type NextAuthenticationRequest

type NextAuthenticationRequest struct {
	Context   *NextAuthenticationRequest_AuthenticationContext `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"`
	Transient *NextAuthenticationRequest_Transient             `protobuf:"bytes,2,opt,name=transient,proto3" json:"transient,omitempty"`
	// contains filtered or unexported fields
}

func (*NextAuthenticationRequest) Descriptor deprecated

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

Deprecated: Use NextAuthenticationRequest.ProtoReflect.Descriptor instead.

func (*NextAuthenticationRequest) GetContext

func (*NextAuthenticationRequest) GetTransient

func (*NextAuthenticationRequest) ProtoMessage

func (*NextAuthenticationRequest) ProtoMessage()

func (*NextAuthenticationRequest) ProtoReflect

func (*NextAuthenticationRequest) Reset

func (x *NextAuthenticationRequest) Reset()

func (*NextAuthenticationRequest) String

func (x *NextAuthenticationRequest) String() string

type NextAuthenticationRequest_AuthenticationContext

type NextAuthenticationRequest_AuthenticationContext struct {

	// User currently being authenticated.
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// Pending
	Pending Amr `protobuf:"varint,2,opt,name=pending,proto3,enum=dyna.Amr" json:"pending,omitempty"`
	// List of completed authentication methods.
	Amr []Amr `protobuf:"varint,3,rep,packed,name=amr,proto3,enum=dyna.Amr" json:"amr,omitempty"`
	// Password authentication state (when amr is pwd)
	Pwd *PasswordAuthenticationState `protobuf:"bytes,10,opt,name=pwd,proto3" json:"pwd,omitempty"`
	// contains filtered or unexported fields
}

func (*NextAuthenticationRequest_AuthenticationContext) Descriptor deprecated

Deprecated: Use NextAuthenticationRequest_AuthenticationContext.ProtoReflect.Descriptor instead.

func (*NextAuthenticationRequest_AuthenticationContext) GetAmr

func (*NextAuthenticationRequest_AuthenticationContext) GetPending

func (*NextAuthenticationRequest_AuthenticationContext) GetPwd

func (*NextAuthenticationRequest_AuthenticationContext) GetUser

func (*NextAuthenticationRequest_AuthenticationContext) ProtoMessage

func (*NextAuthenticationRequest_AuthenticationContext) ProtoReflect

func (*NextAuthenticationRequest_AuthenticationContext) Reset

func (*NextAuthenticationRequest_AuthenticationContext) String

type NextAuthenticationRequest_Transient

type NextAuthenticationRequest_Transient struct {
	Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
	// contains filtered or unexported fields
}

func (*NextAuthenticationRequest_Transient) Descriptor deprecated

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

Deprecated: Use NextAuthenticationRequest_Transient.ProtoReflect.Descriptor instead.

func (*NextAuthenticationRequest_Transient) GetIp

func (*NextAuthenticationRequest_Transient) ProtoMessage

func (*NextAuthenticationRequest_Transient) ProtoMessage()

func (*NextAuthenticationRequest_Transient) ProtoReflect

func (*NextAuthenticationRequest_Transient) Reset

func (*NextAuthenticationRequest_Transient) String

type NextAuthenticationResponse

type NextAuthenticationResponse struct {
	Amr   Amr    `protobuf:"varint,1,opt,name=amr,proto3,enum=dyna.Amr" json:"amr,omitempty"`
	Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// Password authentication spec (when amr is pwd)
	Pwd *PasswordAuthenticationSpec `protobuf:"bytes,10,opt,name=pwd,proto3" json:"pwd,omitempty"`
	// contains filtered or unexported fields
}

func (*NextAuthenticationResponse) Descriptor deprecated

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

Deprecated: Use NextAuthenticationResponse.ProtoReflect.Descriptor instead.

func (*NextAuthenticationResponse) GetAmr

func (x *NextAuthenticationResponse) GetAmr() Amr

func (*NextAuthenticationResponse) GetError

func (x *NextAuthenticationResponse) GetError() *Error

func (*NextAuthenticationResponse) GetPwd

func (*NextAuthenticationResponse) ProtoMessage

func (*NextAuthenticationResponse) ProtoMessage()

func (*NextAuthenticationResponse) ProtoReflect

func (*NextAuthenticationResponse) Reset

func (x *NextAuthenticationResponse) Reset()

func (*NextAuthenticationResponse) String

func (x *NextAuthenticationResponse) String() string

type PasswordAuthenticationRequest

type PasswordAuthenticationRequest struct {
	Subject  string                       `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"`
	Password string                       `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	State    *PasswordAuthenticationState `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"`
	// contains filtered or unexported fields
}

func (*PasswordAuthenticationRequest) Descriptor deprecated

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

Deprecated: Use PasswordAuthenticationRequest.ProtoReflect.Descriptor instead.

func (*PasswordAuthenticationRequest) GetPassword

func (x *PasswordAuthenticationRequest) GetPassword() string

func (*PasswordAuthenticationRequest) GetState

func (*PasswordAuthenticationRequest) GetSubject

func (x *PasswordAuthenticationRequest) GetSubject() string

func (*PasswordAuthenticationRequest) ProtoMessage

func (*PasswordAuthenticationRequest) ProtoMessage()

func (*PasswordAuthenticationRequest) ProtoReflect

func (*PasswordAuthenticationRequest) Reset

func (x *PasswordAuthenticationRequest) Reset()

func (*PasswordAuthenticationRequest) String

type PasswordAuthenticationResponse

type PasswordAuthenticationResponse struct {
	Success      bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	AttemptsLeft int32  `protobuf:"varint,2,opt,name=attemptsLeft,proto3" json:"attemptsLeft,omitempty"`
	Error        *Error `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*PasswordAuthenticationResponse) Descriptor deprecated

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

Deprecated: Use PasswordAuthenticationResponse.ProtoReflect.Descriptor instead.

func (*PasswordAuthenticationResponse) GetAttemptsLeft

func (x *PasswordAuthenticationResponse) GetAttemptsLeft() int32

func (*PasswordAuthenticationResponse) GetError

func (x *PasswordAuthenticationResponse) GetError() *Error

func (*PasswordAuthenticationResponse) GetSuccess

func (x *PasswordAuthenticationResponse) GetSuccess() bool

func (*PasswordAuthenticationResponse) ProtoMessage

func (*PasswordAuthenticationResponse) ProtoMessage()

func (*PasswordAuthenticationResponse) ProtoReflect

func (*PasswordAuthenticationResponse) Reset

func (x *PasswordAuthenticationResponse) Reset()

func (*PasswordAuthenticationResponse) String

type PasswordAuthenticationSpec

type PasswordAuthenticationSpec struct {
	MaxAttempts int32 `protobuf:"varint,1,opt,name=maxAttempts,proto3" json:"maxAttempts,omitempty"`
	// contains filtered or unexported fields
}

func (*PasswordAuthenticationSpec) Descriptor deprecated

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

Deprecated: Use PasswordAuthenticationSpec.ProtoReflect.Descriptor instead.

func (*PasswordAuthenticationSpec) GetMaxAttempts

func (x *PasswordAuthenticationSpec) GetMaxAttempts() int32

func (*PasswordAuthenticationSpec) ProtoMessage

func (*PasswordAuthenticationSpec) ProtoMessage()

func (*PasswordAuthenticationSpec) ProtoReflect

func (*PasswordAuthenticationSpec) Reset

func (x *PasswordAuthenticationSpec) Reset()

func (*PasswordAuthenticationSpec) String

func (x *PasswordAuthenticationSpec) String() string

type PasswordAuthenticationState

type PasswordAuthenticationState struct {
	Success                 bool    `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	FailedAttemptTimestamps []int64 `protobuf:"varint,2,rep,packed,name=failedAttemptTimestamps,proto3" json:"failedAttemptTimestamps,omitempty"`
	// contains filtered or unexported fields
}

func (*PasswordAuthenticationState) Descriptor deprecated

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

Deprecated: Use PasswordAuthenticationState.ProtoReflect.Descriptor instead.

func (*PasswordAuthenticationState) GetFailedAttemptTimestamps

func (x *PasswordAuthenticationState) GetFailedAttemptTimestamps() []int64

func (*PasswordAuthenticationState) GetSuccess

func (x *PasswordAuthenticationState) GetSuccess() bool

func (*PasswordAuthenticationState) ProtoMessage

func (*PasswordAuthenticationState) ProtoMessage()

func (*PasswordAuthenticationState) ProtoReflect

func (*PasswordAuthenticationState) Reset

func (x *PasswordAuthenticationState) Reset()

func (*PasswordAuthenticationState) String

func (x *PasswordAuthenticationState) String() string

type PasswordAuthenticatorClient

type PasswordAuthenticatorClient interface {
	CheckPassword(ctx context.Context, in *PasswordAuthenticationRequest, opts ...grpc.CallOption) (*PasswordAuthenticationResponse, error)
}

PasswordAuthenticatorClient is the client API for PasswordAuthenticator 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 PasswordAuthenticatorServer

type PasswordAuthenticatorServer interface {
	CheckPassword(context.Context, *PasswordAuthenticationRequest) (*PasswordAuthenticationResponse, error)
	// contains filtered or unexported methods
}

PasswordAuthenticatorServer is the server API for PasswordAuthenticator service. All implementations must embed UnimplementedPasswordAuthenticatorServer for forward compatibility

type UnimplementedAuthenticationCoordinatorServer

type UnimplementedAuthenticationCoordinatorServer struct {
}

UnimplementedAuthenticationCoordinatorServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthenticationCoordinatorServer) NextAuthentication

type UnimplementedPasswordAuthenticatorServer

type UnimplementedPasswordAuthenticatorServer struct {
}

UnimplementedPasswordAuthenticatorServer must be embedded to have forward compatible implementations.

type UnimplementedUserProviderServer

type UnimplementedUserProviderServer struct {
}

UnimplementedUserProviderServer must be embedded to have forward compatible implementations.

func (UnimplementedUserProviderServer) GetUser

type UnsafeAuthenticationCoordinatorServer

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

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

type UnsafePasswordAuthenticatorServer

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

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

type UnsafeUserProviderServer

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

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

type User

type User struct {

	// Subject of the user. It corresponds to the "sub" claim.
	Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"`
	// Rest of the user claims, serialized as JSON. Keys used here should be
	// standard claim names as they will be passed on without modification.
	// Claims in the raw json may or may not include "sub".
	RawJson string `protobuf:"bytes,2,opt,name=raw_json,json=rawJson,proto3" json:"raw_json,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetRawJson

func (x *User) GetRawJson() string

func (*User) GetSub

func (x *User) GetSub() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserProviderClient

type UserProviderClient interface {
	GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
}

UserProviderClient is the client API for UserProvider 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 UserProviderServer

type UserProviderServer interface {
	GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
	// contains filtered or unexported methods
}

UserProviderServer is the server API for UserProvider service. All implementations must embed UnimplementedUserProviderServer for forward compatibility

Jump to

Keyboard shortcuts

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