Versions in this module Expand all Collapse all v0 v0.12.4 Jan 17, 2024 Changes in this version + var ErrIntOverflowAuth = fmt.Errorf("proto: integer overflow") + var ErrInvalidLengthAuth = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrUnexpectedEndOfGroupAuth = fmt.Errorf("proto: unexpected end of group") + func CredentialsFunc(sm *session.Manager, g session.Group) func(string) (session, username, secret string, err error) + func GetTokenAuthority(ctx context.Context, host string, sm *session.Manager, g session.Group) (sessionID string, pubKey *[32]byte, err error) + func RegisterAuthServer(s *grpc.Server, srv AuthServer) + func VerifyTokenAuthority(ctx context.Context, host string, pubKey *[32]byte, sm *session.Manager, ...) (sessionID string, ok bool, err error) + type AuthClient interface + Credentials func(ctx context.Context, in *CredentialsRequest, opts ...grpc.CallOption) (*CredentialsResponse, error) + FetchToken func(ctx context.Context, in *FetchTokenRequest, opts ...grpc.CallOption) (*FetchTokenResponse, error) + GetTokenAuthority func(ctx context.Context, in *GetTokenAuthorityRequest, opts ...grpc.CallOption) (*GetTokenAuthorityResponse, error) + VerifyTokenAuthority func(ctx context.Context, in *VerifyTokenAuthorityRequest, opts ...grpc.CallOption) (*VerifyTokenAuthorityResponse, error) + func NewAuthClient(cc *grpc.ClientConn) AuthClient + type AuthServer interface + Credentials func(context.Context, *CredentialsRequest) (*CredentialsResponse, error) + FetchToken func(context.Context, *FetchTokenRequest) (*FetchTokenResponse, error) + GetTokenAuthority func(context.Context, *GetTokenAuthorityRequest) (*GetTokenAuthorityResponse, error) + VerifyTokenAuthority func(context.Context, *VerifyTokenAuthorityRequest) (*VerifyTokenAuthorityResponse, error) + type CredentialsRequest struct + Host string + func (*CredentialsRequest) Descriptor() ([]byte, []int) + func (*CredentialsRequest) ProtoMessage() + func (m *CredentialsRequest) GetHost() string + func (m *CredentialsRequest) Marshal() (dAtA []byte, err error) + func (m *CredentialsRequest) MarshalTo(dAtA []byte) (int, error) + func (m *CredentialsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *CredentialsRequest) Reset() + func (m *CredentialsRequest) Size() (n int) + func (m *CredentialsRequest) Unmarshal(dAtA []byte) error + func (m *CredentialsRequest) XXX_DiscardUnknown() + func (m *CredentialsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *CredentialsRequest) XXX_Merge(src proto.Message) + func (m *CredentialsRequest) XXX_Size() int + func (m *CredentialsRequest) XXX_Unmarshal(b []byte) error + func (this *CredentialsRequest) Equal(that interface{}) bool + func (this *CredentialsRequest) GoString() string + func (this *CredentialsRequest) String() string + type CredentialsResponse struct + Secret string + Username string + func (*CredentialsResponse) Descriptor() ([]byte, []int) + func (*CredentialsResponse) ProtoMessage() + func (m *CredentialsResponse) GetSecret() string + func (m *CredentialsResponse) GetUsername() string + func (m *CredentialsResponse) Marshal() (dAtA []byte, err error) + func (m *CredentialsResponse) MarshalTo(dAtA []byte) (int, error) + func (m *CredentialsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *CredentialsResponse) Reset() + func (m *CredentialsResponse) Size() (n int) + func (m *CredentialsResponse) Unmarshal(dAtA []byte) error + func (m *CredentialsResponse) XXX_DiscardUnknown() + func (m *CredentialsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *CredentialsResponse) XXX_Merge(src proto.Message) + func (m *CredentialsResponse) XXX_Size() int + func (m *CredentialsResponse) XXX_Unmarshal(b []byte) error + func (this *CredentialsResponse) Equal(that interface{}) bool + func (this *CredentialsResponse) GoString() string + func (this *CredentialsResponse) String() string + type FetchTokenRequest struct + ClientID string + Host string + Realm string + Scopes []string + Service string + func (*FetchTokenRequest) Descriptor() ([]byte, []int) + func (*FetchTokenRequest) ProtoMessage() + func (m *FetchTokenRequest) GetClientID() string + func (m *FetchTokenRequest) GetHost() string + func (m *FetchTokenRequest) GetRealm() string + func (m *FetchTokenRequest) GetScopes() []string + func (m *FetchTokenRequest) GetService() string + func (m *FetchTokenRequest) Marshal() (dAtA []byte, err error) + func (m *FetchTokenRequest) MarshalTo(dAtA []byte) (int, error) + func (m *FetchTokenRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *FetchTokenRequest) Reset() + func (m *FetchTokenRequest) Size() (n int) + func (m *FetchTokenRequest) Unmarshal(dAtA []byte) error + func (m *FetchTokenRequest) XXX_DiscardUnknown() + func (m *FetchTokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *FetchTokenRequest) XXX_Merge(src proto.Message) + func (m *FetchTokenRequest) XXX_Size() int + func (m *FetchTokenRequest) XXX_Unmarshal(b []byte) error + func (this *FetchTokenRequest) Equal(that interface{}) bool + func (this *FetchTokenRequest) GoString() string + func (this *FetchTokenRequest) String() string + type FetchTokenResponse struct + ExpiresIn int64 + IssuedAt int64 + Token string + func FetchToken(ctx context.Context, req *FetchTokenRequest, sm *session.Manager, ...) (resp *FetchTokenResponse, err error) + func (*FetchTokenResponse) Descriptor() ([]byte, []int) + func (*FetchTokenResponse) ProtoMessage() + func (m *FetchTokenResponse) GetExpiresIn() int64 + func (m *FetchTokenResponse) GetIssuedAt() int64 + func (m *FetchTokenResponse) GetToken() string + func (m *FetchTokenResponse) Marshal() (dAtA []byte, err error) + func (m *FetchTokenResponse) MarshalTo(dAtA []byte) (int, error) + func (m *FetchTokenResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *FetchTokenResponse) Reset() + func (m *FetchTokenResponse) Size() (n int) + func (m *FetchTokenResponse) Unmarshal(dAtA []byte) error + func (m *FetchTokenResponse) XXX_DiscardUnknown() + func (m *FetchTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *FetchTokenResponse) XXX_Merge(src proto.Message) + func (m *FetchTokenResponse) XXX_Size() int + func (m *FetchTokenResponse) XXX_Unmarshal(b []byte) error + func (this *FetchTokenResponse) Equal(that interface{}) bool + func (this *FetchTokenResponse) GoString() string + func (this *FetchTokenResponse) String() string + type GetTokenAuthorityRequest struct + Host string + Salt []byte + func (*GetTokenAuthorityRequest) Descriptor() ([]byte, []int) + func (*GetTokenAuthorityRequest) ProtoMessage() + func (m *GetTokenAuthorityRequest) GetHost() string + func (m *GetTokenAuthorityRequest) GetSalt() []byte + func (m *GetTokenAuthorityRequest) Marshal() (dAtA []byte, err error) + func (m *GetTokenAuthorityRequest) MarshalTo(dAtA []byte) (int, error) + func (m *GetTokenAuthorityRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *GetTokenAuthorityRequest) Reset() + func (m *GetTokenAuthorityRequest) Size() (n int) + func (m *GetTokenAuthorityRequest) Unmarshal(dAtA []byte) error + func (m *GetTokenAuthorityRequest) XXX_DiscardUnknown() + func (m *GetTokenAuthorityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *GetTokenAuthorityRequest) XXX_Merge(src proto.Message) + func (m *GetTokenAuthorityRequest) XXX_Size() int + func (m *GetTokenAuthorityRequest) XXX_Unmarshal(b []byte) error + func (this *GetTokenAuthorityRequest) Equal(that interface{}) bool + func (this *GetTokenAuthorityRequest) GoString() string + func (this *GetTokenAuthorityRequest) String() string + type GetTokenAuthorityResponse struct + PublicKey []byte + func (*GetTokenAuthorityResponse) Descriptor() ([]byte, []int) + func (*GetTokenAuthorityResponse) ProtoMessage() + func (m *GetTokenAuthorityResponse) GetPublicKey() []byte + func (m *GetTokenAuthorityResponse) Marshal() (dAtA []byte, err error) + func (m *GetTokenAuthorityResponse) MarshalTo(dAtA []byte) (int, error) + func (m *GetTokenAuthorityResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *GetTokenAuthorityResponse) Reset() + func (m *GetTokenAuthorityResponse) Size() (n int) + func (m *GetTokenAuthorityResponse) Unmarshal(dAtA []byte) error + func (m *GetTokenAuthorityResponse) XXX_DiscardUnknown() + func (m *GetTokenAuthorityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *GetTokenAuthorityResponse) XXX_Merge(src proto.Message) + func (m *GetTokenAuthorityResponse) XXX_Size() int + func (m *GetTokenAuthorityResponse) XXX_Unmarshal(b []byte) error + func (this *GetTokenAuthorityResponse) Equal(that interface{}) bool + func (this *GetTokenAuthorityResponse) GoString() string + func (this *GetTokenAuthorityResponse) String() string + type UnimplementedAuthServer struct + func (*UnimplementedAuthServer) Credentials(ctx context.Context, req *CredentialsRequest) (*CredentialsResponse, error) + func (*UnimplementedAuthServer) FetchToken(ctx context.Context, req *FetchTokenRequest) (*FetchTokenResponse, error) + func (*UnimplementedAuthServer) GetTokenAuthority(ctx context.Context, req *GetTokenAuthorityRequest) (*GetTokenAuthorityResponse, error) + func (*UnimplementedAuthServer) VerifyTokenAuthority(ctx context.Context, req *VerifyTokenAuthorityRequest) (*VerifyTokenAuthorityResponse, error) + type VerifyTokenAuthorityRequest struct + Host string + Payload []byte + Salt []byte + func (*VerifyTokenAuthorityRequest) Descriptor() ([]byte, []int) + func (*VerifyTokenAuthorityRequest) ProtoMessage() + func (m *VerifyTokenAuthorityRequest) GetHost() string + func (m *VerifyTokenAuthorityRequest) GetPayload() []byte + func (m *VerifyTokenAuthorityRequest) GetSalt() []byte + func (m *VerifyTokenAuthorityRequest) Marshal() (dAtA []byte, err error) + func (m *VerifyTokenAuthorityRequest) MarshalTo(dAtA []byte) (int, error) + func (m *VerifyTokenAuthorityRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *VerifyTokenAuthorityRequest) Reset() + func (m *VerifyTokenAuthorityRequest) Size() (n int) + func (m *VerifyTokenAuthorityRequest) Unmarshal(dAtA []byte) error + func (m *VerifyTokenAuthorityRequest) XXX_DiscardUnknown() + func (m *VerifyTokenAuthorityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *VerifyTokenAuthorityRequest) XXX_Merge(src proto.Message) + func (m *VerifyTokenAuthorityRequest) XXX_Size() int + func (m *VerifyTokenAuthorityRequest) XXX_Unmarshal(b []byte) error + func (this *VerifyTokenAuthorityRequest) Equal(that interface{}) bool + func (this *VerifyTokenAuthorityRequest) GoString() string + func (this *VerifyTokenAuthorityRequest) String() string + type VerifyTokenAuthorityResponse struct + Signed []byte + func (*VerifyTokenAuthorityResponse) Descriptor() ([]byte, []int) + func (*VerifyTokenAuthorityResponse) ProtoMessage() + func (m *VerifyTokenAuthorityResponse) GetSigned() []byte + func (m *VerifyTokenAuthorityResponse) Marshal() (dAtA []byte, err error) + func (m *VerifyTokenAuthorityResponse) MarshalTo(dAtA []byte) (int, error) + func (m *VerifyTokenAuthorityResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *VerifyTokenAuthorityResponse) Reset() + func (m *VerifyTokenAuthorityResponse) Size() (n int) + func (m *VerifyTokenAuthorityResponse) Unmarshal(dAtA []byte) error + func (m *VerifyTokenAuthorityResponse) XXX_DiscardUnknown() + func (m *VerifyTokenAuthorityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *VerifyTokenAuthorityResponse) XXX_Merge(src proto.Message) + func (m *VerifyTokenAuthorityResponse) XXX_Size() int + func (m *VerifyTokenAuthorityResponse) XXX_Unmarshal(b []byte) error + func (this *VerifyTokenAuthorityResponse) Equal(that interface{}) bool + func (this *VerifyTokenAuthorityResponse) GoString() string + func (this *VerifyTokenAuthorityResponse) String() string