Documentation
¶
Index ¶
- Constants
- func ComparePasswords(hashedPassword, password string) bool
- func DestroyJWT(w http.ResponseWriter)
- func GenerateToken(w http.ResponseWriter, id int) (string, error)
- func GetUserFromContext(ctx context.Context) (*types.User, bool)
- func HashPassword(password string) (string, error)
- func ParseToken(tokenString string) (*jwt.Token, error)
- func PermissionDenied(w http.ResponseWriter, r *http.Request)
- func WithJWT(userStore types.UserStore) func(http.Handler) http.Handler
Constants ¶
View Source
const UserKey userContextKey = "user"
Variables ¶
This section is empty.
Functions ¶
func ComparePasswords ¶
func DestroyJWT ¶
func DestroyJWT(w http.ResponseWriter)
func GenerateToken ¶
func GenerateToken(w http.ResponseWriter, id int) (string, error)
func HashPassword ¶
func ParseToken ¶
func PermissionDenied ¶
func PermissionDenied(w http.ResponseWriter, r *http.Request)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.