auth

package
v1.0.0-beta.28 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthAuth        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAuth          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAuth = fmt.Errorf("proto: unexpected end of group")
)

Functions

func CredentialsFunc

func CredentialsFunc(sm *session.Manager, g session.Group) func(string) (session, username, secret string, err error)

func GetTokenAuthority

func GetTokenAuthority(ctx context.Context, host string, sm *session.Manager, g session.Group) (sessionID string, pubKey *[32]byte, err error)

func RegisterAuthServer

func RegisterAuthServer(s *grpc.Server, srv AuthServer)

func RegisterCredentialsServer

func RegisterCredentialsServer(s *grpc.Server, srv AuthServer)

RegisterCredentialsServer registers only the Credentials method of the Auth service. The token methods are not registered, so the client does not advertise them and the engine cannot call them.

func VerifyTokenAuthority

func VerifyTokenAuthority(ctx context.Context, host string, pubKey *[32]byte, sm *session.Manager, g session.Group) (sessionID string, ok bool, err error)

Types

type AuthClient

type AuthClient interface {
	Credentials(ctx context.Context, in *CredentialsRequest, opts ...grpc.CallOption) (*CredentialsResponse, error)
	FetchToken(ctx context.Context, in *FetchTokenRequest, opts ...grpc.CallOption) (*FetchTokenResponse, error)
	GetTokenAuthority(ctx context.Context, in *GetTokenAuthorityRequest, opts ...grpc.CallOption) (*GetTokenAuthorityResponse, error)
	VerifyTokenAuthority(ctx context.Context, in *VerifyTokenAuthorityRequest, opts ...grpc.CallOption) (*VerifyTokenAuthorityResponse, error)
}

AuthClient is the client API for Auth service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewAuthClient

func NewAuthClient(cc *grpc.ClientConn) AuthClient

type AuthServer

AuthServer is the server API for Auth service.

type CredentialsRequest

type CredentialsRequest struct {
	Host string `protobuf:"bytes,1,opt,name=Host,proto3" json:"Host,omitempty"`
}

func (*CredentialsRequest) Descriptor

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

func (*CredentialsRequest) Equal

func (this *CredentialsRequest) Equal(that interface{}) bool

func (*CredentialsRequest) GetHost

func (m *CredentialsRequest) GetHost() string

func (*CredentialsRequest) GoString

func (this *CredentialsRequest) GoString() string

func (*CredentialsRequest) Marshal

func (m *CredentialsRequest) Marshal() (dAtA []byte, err error)

func (*CredentialsRequest) MarshalTo

func (m *CredentialsRequest) MarshalTo(dAtA []byte) (int, error)

func (*CredentialsRequest) MarshalToSizedBuffer

func (m *CredentialsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CredentialsRequest) ProtoMessage

func (*CredentialsRequest) ProtoMessage()

func (*CredentialsRequest) Reset

func (m *CredentialsRequest) Reset()

func (*CredentialsRequest) Size

func (m *CredentialsRequest) Size() (n int)

func (*CredentialsRequest) String

func (this *CredentialsRequest) String() string

func (*CredentialsRequest) Unmarshal

func (m *CredentialsRequest) Unmarshal(dAtA []byte) error

func (*CredentialsRequest) XXX_DiscardUnknown

func (m *CredentialsRequest) XXX_DiscardUnknown()

func (*CredentialsRequest) XXX_Marshal

func (m *CredentialsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CredentialsRequest) XXX_Merge

func (m *CredentialsRequest) XXX_Merge(src proto.Message)

func (*CredentialsRequest) XXX_Size

func (m *CredentialsRequest) XXX_Size() int

func (*CredentialsRequest) XXX_Unmarshal

func (m *CredentialsRequest) XXX_Unmarshal(b []byte) error

type CredentialsResponse

type CredentialsResponse struct {
	Username string `protobuf:"bytes,1,opt,name=Username,proto3" json:"Username,omitempty"`
	Secret   string `protobuf:"bytes,2,opt,name=Secret,proto3" json:"Secret,omitempty"`
}

func (*CredentialsResponse) Descriptor

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

func (*CredentialsResponse) Equal

func (this *CredentialsResponse) Equal(that interface{}) bool

func (*CredentialsResponse) GetSecret

func (m *CredentialsResponse) GetSecret() string

func (*CredentialsResponse) GetUsername

func (m *CredentialsResponse) GetUsername() string

func (*CredentialsResponse) GoString

func (this *CredentialsResponse) GoString() string

func (*CredentialsResponse) Marshal

func (m *CredentialsResponse) Marshal() (dAtA []byte, err error)

func (*CredentialsResponse) MarshalTo

func (m *CredentialsResponse) MarshalTo(dAtA []byte) (int, error)

func (*CredentialsResponse) MarshalToSizedBuffer

func (m *CredentialsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CredentialsResponse) ProtoMessage

func (*CredentialsResponse) ProtoMessage()

func (*CredentialsResponse) Reset

func (m *CredentialsResponse) Reset()

func (*CredentialsResponse) Size

func (m *CredentialsResponse) Size() (n int)

func (*CredentialsResponse) String

func (this *CredentialsResponse) String() string

func (*CredentialsResponse) Unmarshal

func (m *CredentialsResponse) Unmarshal(dAtA []byte) error

func (*CredentialsResponse) XXX_DiscardUnknown

func (m *CredentialsResponse) XXX_DiscardUnknown()

func (*CredentialsResponse) XXX_Marshal

func (m *CredentialsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CredentialsResponse) XXX_Merge

func (m *CredentialsResponse) XXX_Merge(src proto.Message)

func (*CredentialsResponse) XXX_Size

func (m *CredentialsResponse) XXX_Size() int

func (*CredentialsResponse) XXX_Unmarshal

func (m *CredentialsResponse) XXX_Unmarshal(b []byte) error

type FetchTokenRequest

type FetchTokenRequest struct {
	ClientID string   `protobuf:"bytes,1,opt,name=ClientID,proto3" json:"ClientID,omitempty"`
	Host     string   `protobuf:"bytes,2,opt,name=Host,proto3" json:"Host,omitempty"`
	Realm    string   `protobuf:"bytes,3,opt,name=Realm,proto3" json:"Realm,omitempty"`
	Service  string   `protobuf:"bytes,4,opt,name=Service,proto3" json:"Service,omitempty"`
	Scopes   []string `protobuf:"bytes,5,rep,name=Scopes,proto3" json:"Scopes,omitempty"`
}

func (*FetchTokenRequest) Descriptor

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

func (*FetchTokenRequest) Equal

func (this *FetchTokenRequest) Equal(that interface{}) bool

func (*FetchTokenRequest) GetClientID

func (m *FetchTokenRequest) GetClientID() string

func (*FetchTokenRequest) GetHost

func (m *FetchTokenRequest) GetHost() string

func (*FetchTokenRequest) GetRealm

func (m *FetchTokenRequest) GetRealm() string

func (*FetchTokenRequest) GetScopes

func (m *FetchTokenRequest) GetScopes() []string

func (*FetchTokenRequest) GetService

func (m *FetchTokenRequest) GetService() string

func (*FetchTokenRequest) GoString

func (this *FetchTokenRequest) GoString() string

func (*FetchTokenRequest) Marshal

func (m *FetchTokenRequest) Marshal() (dAtA []byte, err error)

func (*FetchTokenRequest) MarshalTo

func (m *FetchTokenRequest) MarshalTo(dAtA []byte) (int, error)

func (*FetchTokenRequest) MarshalToSizedBuffer

func (m *FetchTokenRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*FetchTokenRequest) ProtoMessage

func (*FetchTokenRequest) ProtoMessage()

func (*FetchTokenRequest) Reset

func (m *FetchTokenRequest) Reset()

func (*FetchTokenRequest) Size

func (m *FetchTokenRequest) Size() (n int)

func (*FetchTokenRequest) String

func (this *FetchTokenRequest) String() string

func (*FetchTokenRequest) Unmarshal

func (m *FetchTokenRequest) Unmarshal(dAtA []byte) error

func (*FetchTokenRequest) XXX_DiscardUnknown

func (m *FetchTokenRequest) XXX_DiscardUnknown()

func (*FetchTokenRequest) XXX_Marshal

func (m *FetchTokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FetchTokenRequest) XXX_Merge

func (m *FetchTokenRequest) XXX_Merge(src proto.Message)

func (*FetchTokenRequest) XXX_Size

func (m *FetchTokenRequest) XXX_Size() int

func (*FetchTokenRequest) XXX_Unmarshal

func (m *FetchTokenRequest) XXX_Unmarshal(b []byte) error

type FetchTokenResponse

type FetchTokenResponse struct {
	Token            string `protobuf:"bytes,1,opt,name=Token,proto3" json:"Token,omitempty"`
	ExpiresInSeconds int64  `protobuf:"varint,2,opt,name=ExpiresInSeconds,proto3" json:"ExpiresInSeconds,omitempty"`
	IssuedAt         int64  `protobuf:"varint,3,opt,name=IssuedAt,proto3" json:"IssuedAt,omitempty"`
}

func FetchToken

func FetchToken(ctx context.Context, req *FetchTokenRequest, sm *session.Manager, g session.Group) (resp *FetchTokenResponse, err error)

func (*FetchTokenResponse) Descriptor

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

func (*FetchTokenResponse) Equal

func (this *FetchTokenResponse) Equal(that interface{}) bool

func (*FetchTokenResponse) GetExpiresInSeconds added in v0.19.0

func (m *FetchTokenResponse) GetExpiresInSeconds() int64

func (*FetchTokenResponse) GetIssuedAt

func (m *FetchTokenResponse) GetIssuedAt() int64

func (*FetchTokenResponse) GetToken

func (m *FetchTokenResponse) GetToken() string

func (*FetchTokenResponse) GoString

func (this *FetchTokenResponse) GoString() string

func (*FetchTokenResponse) Marshal

func (m *FetchTokenResponse) Marshal() (dAtA []byte, err error)

func (*FetchTokenResponse) MarshalTo

func (m *FetchTokenResponse) MarshalTo(dAtA []byte) (int, error)

func (*FetchTokenResponse) MarshalToSizedBuffer

func (m *FetchTokenResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*FetchTokenResponse) ProtoMessage

func (*FetchTokenResponse) ProtoMessage()

func (*FetchTokenResponse) Reset

func (m *FetchTokenResponse) Reset()

func (*FetchTokenResponse) Size

func (m *FetchTokenResponse) Size() (n int)

func (*FetchTokenResponse) String

func (this *FetchTokenResponse) String() string

func (*FetchTokenResponse) Unmarshal

func (m *FetchTokenResponse) Unmarshal(dAtA []byte) error

func (*FetchTokenResponse) XXX_DiscardUnknown

func (m *FetchTokenResponse) XXX_DiscardUnknown()

func (*FetchTokenResponse) XXX_Marshal

func (m *FetchTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FetchTokenResponse) XXX_Merge

func (m *FetchTokenResponse) XXX_Merge(src proto.Message)

func (*FetchTokenResponse) XXX_Size

func (m *FetchTokenResponse) XXX_Size() int

func (*FetchTokenResponse) XXX_Unmarshal

func (m *FetchTokenResponse) XXX_Unmarshal(b []byte) error

type GetTokenAuthorityRequest

type GetTokenAuthorityRequest struct {
	Host string `protobuf:"bytes,1,opt,name=Host,proto3" json:"Host,omitempty"`
	Salt []byte `protobuf:"bytes,2,opt,name=Salt,proto3" json:"Salt,omitempty"`
}

func (*GetTokenAuthorityRequest) Descriptor

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

func (*GetTokenAuthorityRequest) Equal

func (this *GetTokenAuthorityRequest) Equal(that interface{}) bool

func (*GetTokenAuthorityRequest) GetHost

func (m *GetTokenAuthorityRequest) GetHost() string

func (*GetTokenAuthorityRequest) GetSalt

func (m *GetTokenAuthorityRequest) GetSalt() []byte

func (*GetTokenAuthorityRequest) GoString

func (this *GetTokenAuthorityRequest) GoString() string

func (*GetTokenAuthorityRequest) Marshal

func (m *GetTokenAuthorityRequest) Marshal() (dAtA []byte, err error)

func (*GetTokenAuthorityRequest) MarshalTo

func (m *GetTokenAuthorityRequest) MarshalTo(dAtA []byte) (int, error)

func (*GetTokenAuthorityRequest) MarshalToSizedBuffer

func (m *GetTokenAuthorityRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetTokenAuthorityRequest) ProtoMessage

func (*GetTokenAuthorityRequest) ProtoMessage()

func (*GetTokenAuthorityRequest) Reset

func (m *GetTokenAuthorityRequest) Reset()

func (*GetTokenAuthorityRequest) Size

func (m *GetTokenAuthorityRequest) Size() (n int)

func (*GetTokenAuthorityRequest) String

func (this *GetTokenAuthorityRequest) String() string

func (*GetTokenAuthorityRequest) Unmarshal

func (m *GetTokenAuthorityRequest) Unmarshal(dAtA []byte) error

func (*GetTokenAuthorityRequest) XXX_DiscardUnknown

func (m *GetTokenAuthorityRequest) XXX_DiscardUnknown()

func (*GetTokenAuthorityRequest) XXX_Marshal

func (m *GetTokenAuthorityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetTokenAuthorityRequest) XXX_Merge

func (m *GetTokenAuthorityRequest) XXX_Merge(src proto.Message)

func (*GetTokenAuthorityRequest) XXX_Size

func (m *GetTokenAuthorityRequest) XXX_Size() int

func (*GetTokenAuthorityRequest) XXX_Unmarshal

func (m *GetTokenAuthorityRequest) XXX_Unmarshal(b []byte) error

type GetTokenAuthorityResponse

type GetTokenAuthorityResponse struct {
	PublicKey []byte `protobuf:"bytes,1,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"`
}

func (*GetTokenAuthorityResponse) Descriptor

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

func (*GetTokenAuthorityResponse) Equal

func (this *GetTokenAuthorityResponse) Equal(that interface{}) bool

func (*GetTokenAuthorityResponse) GetPublicKey

func (m *GetTokenAuthorityResponse) GetPublicKey() []byte

func (*GetTokenAuthorityResponse) GoString

func (this *GetTokenAuthorityResponse) GoString() string

func (*GetTokenAuthorityResponse) Marshal

func (m *GetTokenAuthorityResponse) Marshal() (dAtA []byte, err error)

func (*GetTokenAuthorityResponse) MarshalTo

func (m *GetTokenAuthorityResponse) MarshalTo(dAtA []byte) (int, error)

func (*GetTokenAuthorityResponse) MarshalToSizedBuffer

func (m *GetTokenAuthorityResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetTokenAuthorityResponse) ProtoMessage

func (*GetTokenAuthorityResponse) ProtoMessage()

func (*GetTokenAuthorityResponse) Reset

func (m *GetTokenAuthorityResponse) Reset()

func (*GetTokenAuthorityResponse) Size

func (m *GetTokenAuthorityResponse) Size() (n int)

func (*GetTokenAuthorityResponse) String

func (this *GetTokenAuthorityResponse) String() string

func (*GetTokenAuthorityResponse) Unmarshal

func (m *GetTokenAuthorityResponse) Unmarshal(dAtA []byte) error

func (*GetTokenAuthorityResponse) XXX_DiscardUnknown

func (m *GetTokenAuthorityResponse) XXX_DiscardUnknown()

func (*GetTokenAuthorityResponse) XXX_Marshal

func (m *GetTokenAuthorityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetTokenAuthorityResponse) XXX_Merge

func (m *GetTokenAuthorityResponse) XXX_Merge(src proto.Message)

func (*GetTokenAuthorityResponse) XXX_Size

func (m *GetTokenAuthorityResponse) XXX_Size() int

func (*GetTokenAuthorityResponse) XXX_Unmarshal

func (m *GetTokenAuthorityResponse) XXX_Unmarshal(b []byte) error

type UnimplementedAuthServer

type UnimplementedAuthServer struct {
}

UnimplementedAuthServer can be embedded to have forward compatible implementations.

func (*UnimplementedAuthServer) Credentials

func (*UnimplementedAuthServer) FetchToken

func (*UnimplementedAuthServer) GetTokenAuthority

func (*UnimplementedAuthServer) VerifyTokenAuthority

type VerifyTokenAuthorityRequest

type VerifyTokenAuthorityRequest struct {
	Host    string `protobuf:"bytes,1,opt,name=Host,proto3" json:"Host,omitempty"`
	Payload []byte `protobuf:"bytes,2,opt,name=Payload,proto3" json:"Payload,omitempty"`
	Salt    []byte `protobuf:"bytes,3,opt,name=Salt,proto3" json:"Salt,omitempty"`
}

func (*VerifyTokenAuthorityRequest) Descriptor

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

func (*VerifyTokenAuthorityRequest) Equal

func (this *VerifyTokenAuthorityRequest) Equal(that interface{}) bool

func (*VerifyTokenAuthorityRequest) GetHost

func (m *VerifyTokenAuthorityRequest) GetHost() string

func (*VerifyTokenAuthorityRequest) GetPayload

func (m *VerifyTokenAuthorityRequest) GetPayload() []byte

func (*VerifyTokenAuthorityRequest) GetSalt

func (m *VerifyTokenAuthorityRequest) GetSalt() []byte

func (*VerifyTokenAuthorityRequest) GoString

func (this *VerifyTokenAuthorityRequest) GoString() string

func (*VerifyTokenAuthorityRequest) Marshal

func (m *VerifyTokenAuthorityRequest) Marshal() (dAtA []byte, err error)

func (*VerifyTokenAuthorityRequest) MarshalTo

func (m *VerifyTokenAuthorityRequest) MarshalTo(dAtA []byte) (int, error)

func (*VerifyTokenAuthorityRequest) MarshalToSizedBuffer

func (m *VerifyTokenAuthorityRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*VerifyTokenAuthorityRequest) ProtoMessage

func (*VerifyTokenAuthorityRequest) ProtoMessage()

func (*VerifyTokenAuthorityRequest) Reset

func (m *VerifyTokenAuthorityRequest) Reset()

func (*VerifyTokenAuthorityRequest) Size

func (m *VerifyTokenAuthorityRequest) Size() (n int)

func (*VerifyTokenAuthorityRequest) String

func (this *VerifyTokenAuthorityRequest) String() string

func (*VerifyTokenAuthorityRequest) Unmarshal

func (m *VerifyTokenAuthorityRequest) Unmarshal(dAtA []byte) error

func (*VerifyTokenAuthorityRequest) XXX_DiscardUnknown

func (m *VerifyTokenAuthorityRequest) XXX_DiscardUnknown()

func (*VerifyTokenAuthorityRequest) XXX_Marshal

func (m *VerifyTokenAuthorityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VerifyTokenAuthorityRequest) XXX_Merge

func (m *VerifyTokenAuthorityRequest) XXX_Merge(src proto.Message)

func (*VerifyTokenAuthorityRequest) XXX_Size

func (m *VerifyTokenAuthorityRequest) XXX_Size() int

func (*VerifyTokenAuthorityRequest) XXX_Unmarshal

func (m *VerifyTokenAuthorityRequest) XXX_Unmarshal(b []byte) error

type VerifyTokenAuthorityResponse

type VerifyTokenAuthorityResponse struct {
	Signed []byte `protobuf:"bytes,1,opt,name=Signed,proto3" json:"Signed,omitempty"`
}

func (*VerifyTokenAuthorityResponse) Descriptor

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

func (*VerifyTokenAuthorityResponse) Equal

func (this *VerifyTokenAuthorityResponse) Equal(that interface{}) bool

func (*VerifyTokenAuthorityResponse) GetSigned

func (m *VerifyTokenAuthorityResponse) GetSigned() []byte

func (*VerifyTokenAuthorityResponse) GoString

func (this *VerifyTokenAuthorityResponse) GoString() string

func (*VerifyTokenAuthorityResponse) Marshal

func (m *VerifyTokenAuthorityResponse) Marshal() (dAtA []byte, err error)

func (*VerifyTokenAuthorityResponse) MarshalTo

func (m *VerifyTokenAuthorityResponse) MarshalTo(dAtA []byte) (int, error)

func (*VerifyTokenAuthorityResponse) MarshalToSizedBuffer

func (m *VerifyTokenAuthorityResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*VerifyTokenAuthorityResponse) ProtoMessage

func (*VerifyTokenAuthorityResponse) ProtoMessage()

func (*VerifyTokenAuthorityResponse) Reset

func (m *VerifyTokenAuthorityResponse) Reset()

func (*VerifyTokenAuthorityResponse) Size

func (m *VerifyTokenAuthorityResponse) Size() (n int)

func (*VerifyTokenAuthorityResponse) String

func (this *VerifyTokenAuthorityResponse) String() string

func (*VerifyTokenAuthorityResponse) Unmarshal

func (m *VerifyTokenAuthorityResponse) Unmarshal(dAtA []byte) error

func (*VerifyTokenAuthorityResponse) XXX_DiscardUnknown

func (m *VerifyTokenAuthorityResponse) XXX_DiscardUnknown()

func (*VerifyTokenAuthorityResponse) XXX_Marshal

func (m *VerifyTokenAuthorityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VerifyTokenAuthorityResponse) XXX_Merge

func (m *VerifyTokenAuthorityResponse) XXX_Merge(src proto.Message)

func (*VerifyTokenAuthorityResponse) XXX_Size

func (m *VerifyTokenAuthorityResponse) XXX_Size() int

func (*VerifyTokenAuthorityResponse) XXX_Unmarshal

func (m *VerifyTokenAuthorityResponse) XXX_Unmarshal(b []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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