auth

package
v6.7.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAuthServiceServer

func RegisterAuthServiceServer(s *grpc.Server, srv AuthServiceServer)

Types

type AuthServiceClient

type AuthServiceClient interface {
	Authenticate(ctx context.Context, in *Credentials, opts ...grpc.CallOption) (*Token, error)
	Verify(ctx context.Context, in *Token, opts ...grpc.CallOption) (*Verification, error)
}

AuthServiceClient is the client API for AuthService service.

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

func NewAuthServiceClient

func NewAuthServiceClient(cc *grpc.ClientConn) AuthServiceClient

type AuthServiceServer

type AuthServiceServer interface {
	Authenticate(context.Context, *Credentials) (*Token, error)
	Verify(context.Context, *Token) (*Verification, error)
}

AuthServiceServer is the server API for AuthService service.

type Credentials

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

The request message containing the credentials data.

func (*Credentials) Descriptor

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

func (*Credentials) GetEmail

func (m *Credentials) GetEmail() string

func (*Credentials) GetPassword

func (m *Credentials) GetPassword() string

func (*Credentials) ProtoMessage

func (*Credentials) ProtoMessage()

func (*Credentials) Reset

func (m *Credentials) Reset()

func (*Credentials) String

func (m *Credentials) String() string

func (*Credentials) XXX_DiscardUnknown

func (m *Credentials) XXX_DiscardUnknown()

func (*Credentials) XXX_Marshal

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

func (*Credentials) XXX_Merge

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

func (*Credentials) XXX_Size

func (m *Credentials) XXX_Size() int

func (*Credentials) XXX_Unmarshal

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

type Token

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

The request/response message containing the jwt data

func (*Token) Descriptor

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

func (*Token) GetJwt

func (m *Token) GetJwt() string

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) Reset

func (m *Token) Reset()

func (*Token) String

func (m *Token) String() string

func (*Token) XXX_DiscardUnknown

func (m *Token) XXX_DiscardUnknown()

func (*Token) XXX_Marshal

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

func (*Token) XXX_Merge

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

func (*Token) XXX_Size

func (m *Token) XXX_Size() int

func (*Token) XXX_Unmarshal

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

type Verification

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

The response message containing the jwt data

func (*Verification) Descriptor

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

func (*Verification) GetIsValid

func (m *Verification) GetIsValid() bool

func (*Verification) ProtoMessage

func (*Verification) ProtoMessage()

func (*Verification) Reset

func (m *Verification) Reset()

func (*Verification) String

func (m *Verification) String() string

func (*Verification) XXX_DiscardUnknown

func (m *Verification) XXX_DiscardUnknown()

func (*Verification) XXX_Marshal

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

func (*Verification) XXX_Merge

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

func (*Verification) XXX_Size

func (m *Verification) XXX_Size() int

func (*Verification) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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