Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var UsernameKey = "username"
Functions ¶
This section is empty.
Types ¶
type AuthOperator ¶
type AuthOperator struct {
// contains filtered or unexported fields
}
AuthOperator used to switch between different authentication strategy.
func (*AuthOperator) AuthFunc ¶
func (operator *AuthOperator) AuthFunc() gin.HandlerFunc
AuthFunc execute resource authentication.
func (*AuthOperator) SetStrategy ¶
func (operator *AuthOperator) SetStrategy(strategy AuthStrategy)
SetStrategy used to set to another authentication strategy.
type AuthStrategy ¶
type AuthStrategy interface {
AuthFunc() gin.HandlerFunc
}
AuthStrategy defines the set of methods used to do resource authentication.
Click to show internal directories.
Click to hide internal directories.