Documentation ¶
Index ¶
- Constants
- func AuthMiddleware(next http.HandlerFunc) http.HandlerFunc
- func GenerateCampaignKey() string
- func GenerateJWT(username string) (string, error)
- func GetCurrentUsername(r *http.Request) string
- func IsAuthorized(r *http.Request) bool
- func ValidateUser(username, password string) bool
- type Claims
Constants ¶
View Source
const KEY_SIZE int = 24
Variables ¶
This section is empty.
Functions ¶
func AuthMiddleware ¶
func AuthMiddleware(next http.HandlerFunc) http.HandlerFunc
func GenerateCampaignKey ¶
func GenerateCampaignKey() string
func GenerateJWT ¶
GenerateJWT generates a new JWT token for a given username
func GetCurrentUsername ¶
func IsAuthorized ¶
func ValidateUser ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.