Documentation ¶
Index ¶
- Constants
- func ComparePasswords(hashed string, plain []byte) bool
- func CreateJWT(secret []byte, userID uuid.UUID) (string, error)
- func GetUserIDFromContext(ctx context.Context) int
- func HashPassword(password string) (string, error)
- func WithJWTAuth(handlerFunc http.HandlerFunc, store types.UserStore) http.HandlerFunc
Constants ¶
View Source
const UserKey contextKey = "userID"
Variables ¶
This section is empty.
Functions ¶
func ComparePasswords ¶
func GetUserIDFromContext ¶
func HashPassword ¶
func WithJWTAuth ¶
func WithJWTAuth(handlerFunc http.HandlerFunc, store types.UserStore) http.HandlerFunc
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.