Documentation ¶
Index ¶
Constants ¶
View Source
const ( // JWTSecretName represents the name of the JWT private key in the keystore. JWTSecretName = "auth-jwt-private" // KTJwtHmacSecret represents the key type of the JWT HMAC secret. KTJwtHmacSecret = "jwt-hmac-secret" )
Variables ¶
This section is empty.
Functions ¶
func APISecret ¶
func APISecret(lr repo.LockedRepo) (*jwt.HMACSHA, error)
APISecret retrieves or generates a new HMACSHA JWT secret from the repository's keystore. It returns the JWT HMACSHA secret and an error if any.
Types ¶
type JwtPayload ¶
type JwtPayload struct {
Allow []auth.Permission
}
JwtPayload represents the payload of a JWT token.
Click to show internal directories.
Click to hide internal directories.