Documentation ¶
Index ¶
Constants ¶
View Source
const AuthCookieName = "Authentication"
View Source
const RefreshCookieName = "RefreshAuthentication"
Variables ¶
This section is empty.
Functions ¶
func DeleteAuthToken ¶
func DeleteAuthToken(w http.ResponseWriter)
func DeleteRefreshToken ¶
func DeleteRefreshToken(w http.ResponseWriter)
func GenerateAuthToken ¶
func GenerateAuthToken(w http.ResponseWriter, user *users.User)
func GenerateRefreshToken ¶
func GenerateRefreshToken(w http.ResponseWriter, user *users.User)
Types ¶
type Claims ¶
type Claims struct { DisplayName string `json:"display"` Role string `json:"role"` jwt.StandardClaims }
type RefreshClaims ¶
type RefreshClaims struct {
jwt.StandardClaims
}
func GetRefreshToken ¶
func GetRefreshToken(r *http.Request) (*RefreshClaims, error)
Click to show internal directories.
Click to hide internal directories.