Categorygithub.com/meateam/auth-utils
modulepackage
1.0.0
Repository: https://github.com/meateam/auth-utils.git
Documentation: pkg.go.dev

# README

auth-utils

Repository for commonly used authentication utilities for Gin

# Functions

ExtractRequestUser gets a context.Context and extracts the user's details from c.
NewAuthenticator creates a new Authenticator.

# Constants

AuthCookie is the name of the authorization cookie.
AuthHeader is the key of the authorization header.
AuthHeaderBearer is the prefix for the authorization token in AuthHeader.
ContextUserKey is the context key used to get and set the user's data in the context.
FirstNameClaim is the claim name for the firstname of the user.
LastNameClaim is the claim name for the lastname of the user.
UserNameLabel is the label for the full user name.

# Structs

Authenticator is a structure that handels the authentication middleware.
User is a structure of an authenticated user.