secret

package
v0.1.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 10 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL