authenticator

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2020 License: BSD-3-Clause Imports: 7 Imported by: 2

README

Build Status codecov GoDoc Go Report Card

Authenticator

A stand-alone gRPC based authentication API. Easily integrate authentication into any custom project. Authenticator takes care of user credential storage and checking. It generates JSON Web tokens for users, which easily can be verified by other servers in your ecosystem using performant and secure EdDSA public key cryptography.

Benefits:
  • Added security, the user credentials live in a seperate database schema as you application's one. Creating a strict seperation in database access;
  • No more password checking logic in you application. Just send a API call to authenticator and check the generated token on each subseqeuent request;

Fautures

  • gRPC based, simply implement a client in your own preferred language by compiling protobuffer files;
  • Support for master/slave database setups using our own MultiDB library;
  • Admin panel for user management;
  • A basic HTTP based login server, based on redirects;
  • Argon2 hashed password storage;
  • User groups and "audiences" for fine grained authorization checking;
  • Comes with the verify Go library, which has ready to use token verification methods to integration even easier;

Status

This project is still under heavy development. We've recently deployed a beta version of the gRPC and admin server.

Future plans

  • Two factor authentication
  • OAuth2 provider support

Development

Protocol buffers

The authenticator server uses gRPC through protocol buffers generation. To regenerate the gRPC definitions, run:

protoc --go_out=plugins=grpc:. authenticator.proto 

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAuthenticatorServer

func RegisterAuthenticatorServer(s *grpc.Server, srv AuthenticatorServer)

Types

type AuthReply

type AuthReply struct {
	// JSON Web Token
	Jwt                  string   `protobuf:"bytes,1,opt,name=jwt,proto3" json:"jwt,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AuthReply) Descriptor

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

func (*AuthReply) GetJwt

func (m *AuthReply) GetJwt() string

func (*AuthReply) ProtoMessage

func (*AuthReply) ProtoMessage()

func (*AuthReply) Reset

func (m *AuthReply) Reset()

func (*AuthReply) String

func (m *AuthReply) String() string

func (*AuthReply) XXX_DiscardUnknown

func (m *AuthReply) XXX_DiscardUnknown()

func (*AuthReply) XXX_Marshal

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

func (*AuthReply) XXX_Merge

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

func (*AuthReply) XXX_Size

func (m *AuthReply) XXX_Size() int

func (*AuthReply) XXX_Unmarshal

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

type AuthenticatorClient

type AuthenticatorClient interface {
	// RegisterPwUser registers a new user which can authenticate using a PW.
	// Server implementation should grant the user only a public role untill verification is complete.
	// Authorization: Public
	RegisterPwUser(ctx context.Context, in *RegistrationData, opts ...grpc.CallOption) (*RegistrationReply, error)
	// PasswordAuth authenticates the user by its registered email or username and password.
	// Authorization: Public
	AuthenticatePwUser(ctx context.Context, in *UserPassword, opts ...grpc.CallOption) (*AuthReply, error)
	// ChangeUserPw changes the password for the user. It needs either the old password or a password reset token.
	// Authorization: Public
	ChangeUserPw(ctx context.Context, in *NewUserPassword, opts ...grpc.CallOption) (*ChangePwReply, error)
	// CheckUserExists returns true for the UserID fields which already exists.
	// Authorization: Basic
	CheckUserExists(ctx context.Context, in *UserData, opts ...grpc.CallOption) (*Exists, error)
	// VerifyUser by previously transmitted (email) verification token
	// Authorization: Public
	VerifyUser(ctx context.Context, in *AuthReply, opts ...grpc.CallOption) (*AuthReply, error)
	// RefreshToken using an old (and valid!) token.
	// The user id and its authorization level are verified against the database.
	// Authorization: Public
	RefreshToken(ctx context.Context, in *AuthReply, opts ...grpc.CallOption) (*AuthReply, error)
	// PublicUserToken generates a token for public and unauthenticated users.
	// Such token can be used for API access and session tracking.
	// Authorization: Internal
	PublicUserToken(ctx context.Context, in *PublicUser, opts ...grpc.CallOption) (*AuthReply, error)
	// GetPubKeys retrieves registered public keys from the database, identified by KeyIDs.
	// Authorization: Internal
	GetPubKey(ctx context.Context, in *KeyID, opts ...grpc.CallOption) (*PublicKey, error)
}

AuthenticatorClient is the client API for Authenticator service.

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

func NewAuthenticatorClient

func NewAuthenticatorClient(cc *grpc.ClientConn) AuthenticatorClient

type AuthenticatorServer

type AuthenticatorServer interface {
	// RegisterPwUser registers a new user which can authenticate using a PW.
	// Server implementation should grant the user only a public role untill verification is complete.
	// Authorization: Public
	RegisterPwUser(context.Context, *RegistrationData) (*RegistrationReply, error)
	// PasswordAuth authenticates the user by its registered email or username and password.
	// Authorization: Public
	AuthenticatePwUser(context.Context, *UserPassword) (*AuthReply, error)
	// ChangeUserPw changes the password for the user. It needs either the old password or a password reset token.
	// Authorization: Public
	ChangeUserPw(context.Context, *NewUserPassword) (*ChangePwReply, error)
	// CheckUserExists returns true for the UserID fields which already exists.
	// Authorization: Basic
	CheckUserExists(context.Context, *UserData) (*Exists, error)
	// VerifyUser by previously transmitted (email) verification token
	// Authorization: Public
	VerifyUser(context.Context, *AuthReply) (*AuthReply, error)
	// RefreshToken using an old (and valid!) token.
	// The user id and its authorization level are verified against the database.
	// Authorization: Public
	RefreshToken(context.Context, *AuthReply) (*AuthReply, error)
	// PublicUserToken generates a token for public and unauthenticated users.
	// Such token can be used for API access and session tracking.
	// Authorization: Internal
	PublicUserToken(context.Context, *PublicUser) (*AuthReply, error)
	// GetPubKeys retrieves registered public keys from the database, identified by KeyIDs.
	// Authorization: Internal
	GetPubKey(context.Context, *KeyID) (*PublicKey, error)
}

AuthenticatorServer is the server API for Authenticator service.

type CallBackUrl

type CallBackUrl struct {
	BaseUrl string `protobuf:"bytes,1,opt,name=base_url,json=baseUrl,proto3" json:"base_url,omitempty"`
	// Query paramater key under which the token will be set in the callback URL.
	// If empty, it defaults to "token"
	TokenKey string `protobuf:"bytes,2,opt,name=token_key,json=tokenKey,proto3" json:"token_key,omitempty"`
	// Other query parameters which need to be added to the callback URL.
	Params               map[string]*StringSlice `` /* 153-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

func (*CallBackUrl) Descriptor

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

func (*CallBackUrl) GetBaseUrl

func (m *CallBackUrl) GetBaseUrl() string

func (*CallBackUrl) GetParams

func (m *CallBackUrl) GetParams() map[string]*StringSlice

func (*CallBackUrl) GetTokenKey

func (m *CallBackUrl) GetTokenKey() string

func (*CallBackUrl) ProtoMessage

func (*CallBackUrl) ProtoMessage()

func (*CallBackUrl) Reset

func (m *CallBackUrl) Reset()

func (*CallBackUrl) String

func (m *CallBackUrl) String() string

func (*CallBackUrl) XXX_DiscardUnknown

func (m *CallBackUrl) XXX_DiscardUnknown()

func (*CallBackUrl) XXX_Marshal

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

func (*CallBackUrl) XXX_Merge

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

func (*CallBackUrl) XXX_Size

func (m *CallBackUrl) XXX_Size() int

func (*CallBackUrl) XXX_Unmarshal

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

type ChangePwReply

type ChangePwReply struct {
	Success              bool     `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ChangePwReply) Descriptor

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

func (*ChangePwReply) GetSuccess

func (m *ChangePwReply) GetSuccess() bool

func (*ChangePwReply) ProtoMessage

func (*ChangePwReply) ProtoMessage()

func (*ChangePwReply) Reset

func (m *ChangePwReply) Reset()

func (*ChangePwReply) String

func (m *ChangePwReply) String() string

func (*ChangePwReply) XXX_DiscardUnknown

func (m *ChangePwReply) XXX_DiscardUnknown()

func (*ChangePwReply) XXX_Marshal

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

func (*ChangePwReply) XXX_Merge

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

func (*ChangePwReply) XXX_Size

func (m *ChangePwReply) XXX_Size() int

func (*ChangePwReply) XXX_Unmarshal

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

type Exists

type Exists struct {
	Email                bool     `protobuf:"varint,1,opt,name=email,proto3" json:"email,omitempty"`
	Name                 bool     `protobuf:"varint,2,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Exists) Descriptor

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

func (*Exists) GetEmail

func (m *Exists) GetEmail() bool

func (*Exists) GetName

func (m *Exists) GetName() bool

func (*Exists) ProtoMessage

func (*Exists) ProtoMessage()

func (*Exists) Reset

func (m *Exists) Reset()

func (*Exists) String

func (m *Exists) String() string

func (*Exists) XXX_DiscardUnknown

func (m *Exists) XXX_DiscardUnknown()

func (*Exists) XXX_Marshal

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

func (*Exists) XXX_Merge

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

func (*Exists) XXX_Size

func (m *Exists) XXX_Size() int

func (*Exists) XXX_Unmarshal

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

type KeyID

type KeyID struct {
	Kid                  int32    `protobuf:"varint,1,opt,name=kid,proto3" json:"kid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*KeyID) Descriptor

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

func (*KeyID) GetKid

func (m *KeyID) GetKid() int32

func (*KeyID) ProtoMessage

func (*KeyID) ProtoMessage()

func (*KeyID) Reset

func (m *KeyID) Reset()

func (*KeyID) String

func (m *KeyID) String() string

func (*KeyID) XXX_DiscardUnknown

func (m *KeyID) XXX_DiscardUnknown()

func (*KeyID) XXX_Marshal

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

func (*KeyID) XXX_Merge

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

func (*KeyID) XXX_Size

func (m *KeyID) XXX_Size() int

func (*KeyID) XXX_Unmarshal

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

type NewUserPassword

type NewUserPassword struct {
	// Types that are valid to be assigned to User:
	//	*NewUserPassword_Email
	//	*NewUserPassword_Name
	User isNewUserPassword_User `protobuf_oneof:"user"`
	// Types that are valid to be assigned to Credential:
	//	*NewUserPassword_OldPassword
	//	*NewUserPassword_ResetToken
	Credential           isNewUserPassword_Credential `protobuf_oneof:"credential"`
	NewPassword          string                       `protobuf:"bytes,5,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                     `json:"-"`
	XXX_unrecognized     []byte                       `json:"-"`
	XXX_sizecache        int32                        `json:"-"`
}

func (*NewUserPassword) Descriptor

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

func (*NewUserPassword) GetCredential

func (m *NewUserPassword) GetCredential() isNewUserPassword_Credential

func (*NewUserPassword) GetEmail

func (m *NewUserPassword) GetEmail() string

func (*NewUserPassword) GetName

func (m *NewUserPassword) GetName() string

func (*NewUserPassword) GetNewPassword

func (m *NewUserPassword) GetNewPassword() string

func (*NewUserPassword) GetOldPassword

func (m *NewUserPassword) GetOldPassword() string

func (*NewUserPassword) GetResetToken

func (m *NewUserPassword) GetResetToken() string

func (*NewUserPassword) GetUser

func (m *NewUserPassword) GetUser() isNewUserPassword_User

func (*NewUserPassword) ProtoMessage

func (*NewUserPassword) ProtoMessage()

func (*NewUserPassword) Reset

func (m *NewUserPassword) Reset()

func (*NewUserPassword) String

func (m *NewUserPassword) String() string

func (*NewUserPassword) XXX_DiscardUnknown

func (m *NewUserPassword) XXX_DiscardUnknown()

func (*NewUserPassword) XXX_Marshal

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

func (*NewUserPassword) XXX_Merge

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

func (*NewUserPassword) XXX_OneofWrappers

func (*NewUserPassword) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*NewUserPassword) XXX_Size

func (m *NewUserPassword) XXX_Size() int

func (*NewUserPassword) XXX_Unmarshal

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

type NewUserPassword_Email

type NewUserPassword_Email struct {
	Email string `protobuf:"bytes,1,opt,name=email,proto3,oneof"`
}

type NewUserPassword_Name

type NewUserPassword_Name struct {
	Name string `protobuf:"bytes,2,opt,name=name,proto3,oneof"`
}

type NewUserPassword_OldPassword

type NewUserPassword_OldPassword struct {
	OldPassword string `protobuf:"bytes,3,opt,name=old_password,json=oldPassword,proto3,oneof"`
}

type NewUserPassword_ResetToken

type NewUserPassword_ResetToken struct {
	ResetToken string `protobuf:"bytes,4,opt,name=reset_token,json=resetToken,proto3,oneof"`
}

type PublicKey

type PublicKey struct {
	Key                  []byte   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PublicKey) Descriptor

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

func (*PublicKey) GetKey

func (m *PublicKey) GetKey() []byte

func (*PublicKey) ProtoMessage

func (*PublicKey) ProtoMessage()

func (*PublicKey) Reset

func (m *PublicKey) Reset()

func (*PublicKey) String

func (m *PublicKey) String() string

func (*PublicKey) XXX_DiscardUnknown

func (m *PublicKey) XXX_DiscardUnknown()

func (*PublicKey) XXX_Marshal

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

func (*PublicKey) XXX_Merge

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

func (*PublicKey) XXX_Size

func (m *PublicKey) XXX_Size() int

func (*PublicKey) XXX_Unmarshal

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

type PublicUser

type PublicUser struct {
	Uuid                 string   `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PublicUser) Descriptor

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

func (*PublicUser) GetUuid

func (m *PublicUser) GetUuid() string

func (*PublicUser) ProtoMessage

func (*PublicUser) ProtoMessage()

func (*PublicUser) Reset

func (m *PublicUser) Reset()

func (*PublicUser) String

func (m *PublicUser) String() string

func (*PublicUser) XXX_DiscardUnknown

func (m *PublicUser) XXX_DiscardUnknown()

func (*PublicUser) XXX_Marshal

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

func (*PublicUser) XXX_Merge

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

func (*PublicUser) XXX_Size

func (m *PublicUser) XXX_Size() int

func (*PublicUser) XXX_Unmarshal

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

type RegistrationData

type RegistrationData struct {
	Email                string       `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Name                 string       `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Url                  *CallBackUrl `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*RegistrationData) Descriptor

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

func (*RegistrationData) GetEmail

func (m *RegistrationData) GetEmail() string

func (*RegistrationData) GetName

func (m *RegistrationData) GetName() string

func (*RegistrationData) GetUrl

func (m *RegistrationData) GetUrl() *CallBackUrl

func (*RegistrationData) ProtoMessage

func (*RegistrationData) ProtoMessage()

func (*RegistrationData) Reset

func (m *RegistrationData) Reset()

func (*RegistrationData) String

func (m *RegistrationData) String() string

func (*RegistrationData) XXX_DiscardUnknown

func (m *RegistrationData) XXX_DiscardUnknown()

func (*RegistrationData) XXX_Marshal

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

func (*RegistrationData) XXX_Merge

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

func (*RegistrationData) XXX_Size

func (m *RegistrationData) XXX_Size() int

func (*RegistrationData) XXX_Unmarshal

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

type RegistrationReply

type RegistrationReply struct {
	UserId               int32    `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RegistrationReply) Descriptor

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

func (*RegistrationReply) GetUserId

func (m *RegistrationReply) GetUserId() int32

func (*RegistrationReply) ProtoMessage

func (*RegistrationReply) ProtoMessage()

func (*RegistrationReply) Reset

func (m *RegistrationReply) Reset()

func (*RegistrationReply) String

func (m *RegistrationReply) String() string

func (*RegistrationReply) XXX_DiscardUnknown

func (m *RegistrationReply) XXX_DiscardUnknown()

func (*RegistrationReply) XXX_Marshal

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

func (*RegistrationReply) XXX_Merge

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

func (*RegistrationReply) XXX_Size

func (m *RegistrationReply) XXX_Size() int

func (*RegistrationReply) XXX_Unmarshal

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

type StringSlice

type StringSlice struct {
	Slice                []string `protobuf:"bytes,1,rep,name=slice,proto3" json:"slice,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*StringSlice) Descriptor

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

func (*StringSlice) GetSlice

func (m *StringSlice) GetSlice() []string

func (*StringSlice) ProtoMessage

func (*StringSlice) ProtoMessage()

func (*StringSlice) Reset

func (m *StringSlice) Reset()

func (*StringSlice) String

func (m *StringSlice) String() string

func (*StringSlice) XXX_DiscardUnknown

func (m *StringSlice) XXX_DiscardUnknown()

func (*StringSlice) XXX_Marshal

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

func (*StringSlice) XXX_Merge

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

func (*StringSlice) XXX_Size

func (m *StringSlice) XXX_Size() int

func (*StringSlice) XXX_Unmarshal

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

type UnimplementedAuthenticatorServer

type UnimplementedAuthenticatorServer struct {
}

UnimplementedAuthenticatorServer can be embedded to have forward compatible implementations.

func (*UnimplementedAuthenticatorServer) AuthenticatePwUser

func (*UnimplementedAuthenticatorServer) AuthenticatePwUser(ctx context.Context, req *UserPassword) (*AuthReply, error)

func (*UnimplementedAuthenticatorServer) ChangeUserPw

func (*UnimplementedAuthenticatorServer) CheckUserExists

func (*UnimplementedAuthenticatorServer) CheckUserExists(ctx context.Context, req *UserData) (*Exists, error)

func (*UnimplementedAuthenticatorServer) GetPubKey

func (*UnimplementedAuthenticatorServer) PublicUserToken

func (*UnimplementedAuthenticatorServer) RefreshToken

func (*UnimplementedAuthenticatorServer) RegisterPwUser

func (*UnimplementedAuthenticatorServer) VerifyUser

type UserData

type UserData struct {
	Email                string   `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserData) Descriptor

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

func (*UserData) GetEmail

func (m *UserData) GetEmail() string

func (*UserData) GetName

func (m *UserData) GetName() string

func (*UserData) ProtoMessage

func (*UserData) ProtoMessage()

func (*UserData) Reset

func (m *UserData) Reset()

func (*UserData) String

func (m *UserData) String() string

func (*UserData) XXX_DiscardUnknown

func (m *UserData) XXX_DiscardUnknown()

func (*UserData) XXX_Marshal

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

func (*UserData) XXX_Merge

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

func (*UserData) XXX_Size

func (m *UserData) XXX_Size() int

func (*UserData) XXX_Unmarshal

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

type UserPassword

type UserPassword struct {
	// Types that are valid to be assigned to User:
	//	*UserPassword_Email
	//	*UserPassword_Name
	User                 isUserPassword_User `protobuf_oneof:"user"`
	Password             string              `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

UserPassword holds the name or e-mail of the user and its password.

func (*UserPassword) Descriptor

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

func (*UserPassword) GetEmail

func (m *UserPassword) GetEmail() string

func (*UserPassword) GetName

func (m *UserPassword) GetName() string

func (*UserPassword) GetPassword

func (m *UserPassword) GetPassword() string

func (*UserPassword) GetUser

func (m *UserPassword) GetUser() isUserPassword_User

func (*UserPassword) ProtoMessage

func (*UserPassword) ProtoMessage()

func (*UserPassword) Reset

func (m *UserPassword) Reset()

func (*UserPassword) String

func (m *UserPassword) String() string

func (*UserPassword) XXX_DiscardUnknown

func (m *UserPassword) XXX_DiscardUnknown()

func (*UserPassword) XXX_Marshal

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

func (*UserPassword) XXX_Merge

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

func (*UserPassword) XXX_OneofWrappers

func (*UserPassword) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*UserPassword) XXX_Size

func (m *UserPassword) XXX_Size() int

func (*UserPassword) XXX_Unmarshal

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

type UserPassword_Email

type UserPassword_Email struct {
	Email string `protobuf:"bytes,1,opt,name=email,proto3,oneof"`
}

type UserPassword_Name

type UserPassword_Name struct {
	Name string `protobuf:"bytes,2,opt,name=name,proto3,oneof"`
}

Directories

Path Synopsis
cmd
admin command
server command
Package verify provides middleware for GRPc servers which need to verify JSON Web Tokens generated by this Authenticator service.
Package verify provides middleware for GRPc servers which need to verify JSON Web Tokens generated by this Authenticator service.

Jump to

Keyboard shortcuts

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