Documentation ¶
Index ¶
- func NewAuthCode(mm interfaces.Models, m *Storage, db *mongo.Database) (res interfaces.AuthCode, err error)
- func NewStorage(mm interfaces.Models, opt *interfaces.AuthOption) interfaces.Storage
- func NewTokens(mm interfaces.Models, m *Storage, db *mongo.Database) (res interfaces.Tokens, err error)
- type AuthCode
- func (c *AuthCode) Add(enableTracing bool, ctx context.Context, req *auth.AuthCodeList) (err error)
- func (c *AuthCode) Del(enableTracing bool, ctx context.Context, req *auth.AuthCodeList) (err error)
- func (c *AuthCode) FindByCode(enableTracing bool, ctx context.Context, code string) (res []*auth.AuthCodeList, err error)
- func (c *AuthCode) FindByState(enableTracing bool, ctx context.Context, state string) (res []*auth.AuthCodeList, err error)
- type Storage
- type Tokens
- func (c *Tokens) DeleteToken(enableTracing bool, ctx context.Context, userid, id string) (err error)
- func (c *Tokens) Find(enableTracing bool, ctx context.Context, query interface{}) (res []*auth.TokenList, err error)
- func (c *Tokens) FindByID(enableTracing bool, ctx context.Context, param string) (res []*auth.TokenList, err error)
- func (c *Tokens) GetToken(enableTracing bool, ctx context.Context, userid, id, appId string, ...) (res types.TokenData, err error)
- func (c *Tokens) InsertToken(enableTracing bool, ctx context.Context, req *auth.TokenList) (err error)
- func (c *Tokens) RevokeToken(enableTracing bool, ctx context.Context, userid, id string) (err error)
- func (c *Tokens) TerminateOtherTokens(enableTracing bool, ctx context.Context, userid, id string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAuthCode ¶
func NewAuthCode(mm interfaces.Models, m *Storage, db *mongo.Database) (res interfaces.AuthCode, err error)
func NewStorage ¶
func NewStorage(mm interfaces.Models, opt *interfaces.AuthOption) interfaces.Storage
func NewTokens ¶
func NewTokens(mm interfaces.Models, m *Storage, db *mongo.Database) (res interfaces.Tokens, err error)
Types ¶
type AuthCode ¶
type AuthCode struct {
// contains filtered or unexported fields
}
func (*AuthCode) FindByCode ¶
func (*AuthCode) FindByState ¶
type Storage ¶
type Storage struct { Options *interfaces.AuthOption DefaultTimeout time.Duration // contains filtered or unexported fields }
func (*Storage) AuthCode ¶
func (c *Storage) AuthCode() interfaces.AuthCode
func (*Storage) CreteIndex ¶
func (c *Storage) CreteIndex(col *mongo.Collection, mongoIndexModel []types.MongoIndex) error
func (*Storage) Tokens ¶
func (c *Storage) Tokens() interfaces.Tokens
type Tokens ¶
type Tokens struct {
// contains filtered or unexported fields
}
func (*Tokens) DeleteToken ¶
func (*Tokens) InsertToken ¶
func (*Tokens) RevokeToken ¶
Click to show internal directories.
Click to hide internal directories.