Documentation ¶
Index ¶
- Constants
- type AuthBasic
- type AuthBearer
- func (a *AuthBearer) AdminAuth(ctx *fasthttp.RequestCtx) bool
- func (a *AuthBearer) Auth(ctx *fasthttp.RequestCtx) bool
- func (a *AuthBearer) GetToken(ctx *fasthttp.RequestCtx) TokenData
- func (a *AuthBearer) NewToken(userData TokenData) (string, error)
- func (a *AuthBearer) RemoveToken(s string) error
- func (a *AuthBearer) String() string
- type MapTokens
- type TokenData
- type Tokens
Constants ¶
View Source
const UserValueToken = "UserToken"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthBasic ¶ added in v1.0.11512
type AuthBasic struct { NewTokenData fncNewTokenData // contains filtered or unexported fields }
func NewAuthBasic ¶ added in v1.0.11512
func (*AuthBasic) AdminAuth ¶ added in v1.0.11512
func (a *AuthBasic) AdminAuth(ctx *fasthttp.RequestCtx) bool
type AuthBearer ¶
type AuthBearer struct {
// contains filtered or unexported fields
}
func NewAuthBearer ¶
func NewAuthBearer(tokens Tokens) *AuthBearer
func (*AuthBearer) AdminAuth ¶
func (a *AuthBearer) AdminAuth(ctx *fasthttp.RequestCtx) bool
func (*AuthBearer) Auth ¶
func (a *AuthBearer) Auth(ctx *fasthttp.RequestCtx) bool
func (*AuthBearer) GetToken ¶
func (a *AuthBearer) GetToken(ctx *fasthttp.RequestCtx) TokenData
func (*AuthBearer) NewToken ¶ added in v1.0.11512
func (a *AuthBearer) NewToken(userData TokenData) (string, error)
func (*AuthBearer) RemoveToken ¶ added in v1.0.11512
func (a *AuthBearer) RemoveToken(s string) error
func (*AuthBearer) String ¶
func (a *AuthBearer) String() string
type MapTokens ¶ added in v1.0.11512
type MapTokens struct {
// contains filtered or unexported fields
}
func NewMapTokens ¶ added in v1.0.11512
func (*MapTokens) RemoveToken ¶ added in v1.0.11512
Click to show internal directories.
Click to hide internal directories.