user

package
v1.75.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Audience = "user-auth.chainloop"

Variables

View Source
var SigningMethod = jwt.SigningMethodHS256

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder(opts ...NewOpt) (*Builder, error)

func (*Builder) GenerateJWT

func (ra *Builder) GenerateJWT(userID string) (string, error)

type CustomClaims

type CustomClaims struct {
	UserID string `json:"user_id"`
	jwt.RegisteredClaims
}

type KeyFunc

type KeyFunc func(token *jwt.Token) (interface{}, error)

type NewOpt

type NewOpt func(b *Builder)

func WithAudience added in v1.75.1

func WithAudience(aud string) NewOpt

func WithExpiration

func WithExpiration(d time.Duration) NewOpt

func WithIssuer

func WithIssuer(issuer string) NewOpt

func WithKeySecret

func WithKeySecret(hmacSecret string) NewOpt

Jump to

Keyboard shortcuts

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