Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInsufficientStrength = errors.New("insufficient strength")
)
Functions ¶
Types ¶
type Context ¶
type Context struct { UserID string TenantID string Claims map[string]interface{} IsLoggedIn bool TenantSide TenantSide AutoSetTenantID bool MultiTenancyDataFilter bool }
func FromContext ¶
func NewContext ¶
func NewContext() *Context
func (*Context) AreAllGranted ¶ added in v0.0.3
type ContextKey ¶
type ContextKey struct{}
type ILookupNormalizer ¶
func NewLookupNormalizer ¶
func NewLookupNormalizer() ILookupNormalizer
type IPasswordHasher ¶
type IPasswordHasher interface { HashPassword(ctx context.Context, plainPassword string) (hash string, err error) VerifyHashedPassword(ctx context.Context, hashedPassword string, plainPassword string) bool }
func NewArgon2PasswordHasher ¶
func NewArgon2PasswordHasher() IPasswordHasher
func NewBcryptPasswordHasher ¶
func NewBcryptPasswordHasher() IPasswordHasher
type IPasswordValidator ¶
func NewPasswordValidator ¶
func NewPasswordValidator() IPasswordValidator
type ITokenizer ¶
type ITokenizer interface { Issue(userID string, extra map[string]interface{}) (token string, err error) Parse(token string) (claims jwt.Claims, err error) ParseFromReq(req *http.Request) (claims jwt.Claims, err error) }
func NewTokenizer ¶
func NewTokenizer(c *TokenizerConfig) ITokenizer
type TokenizerConfig ¶
Click to show internal directories.
Click to hide internal directories.