Documentation
¶
Index ¶
- func AddUser(username, password string) error
- func ChangePassword(username, password string) error
- func CheckCredentials(username, password string) bool
- func CreateToken(userId, password string) (string, error)
- func DropUsers() error
- func GetRole(username string) (string, error)
- func GetRoleFromToken(token string) (string, error)
- func GetUser(username string) (authproviders.UserView, error)
- func GetUserFromToken(token string) (string, error)
- func GetUsers() ([]string, error)
- func InitializeAuth(data json.RawMessage) error
- func RemoveUser(username string) error
- func SetRole(username, role string) error
- func VerifyToken(token string) bool
- func VerifyUserToken(userId, token string) bool
- type AuthConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangePassword ¶
func CheckCredentials ¶
func CreateToken ¶
func GetRoleFromToken ¶ added in v0.0.25
func GetUserFromToken ¶ added in v0.0.25
func InitializeAuth ¶
func InitializeAuth(data json.RawMessage) error
func RemoveUser ¶
func VerifyToken ¶
func VerifyUserToken ¶
Types ¶
type AuthConfig ¶
type AuthConfig struct {
Provider string `json:"provider"`
SecretKey string `json:"secret_key"`
ExpirationTime int `json:"expiration_time,omitempty"`
Settings json.RawMessage `json:"settings"`
}
Click to show internal directories.
Click to hide internal directories.