authn

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidClaims = errors.New("invalid claims")
View Source
var ErrInvalidJWT = errors.New("invalid jwt token")

Functions

func GenerateToken

func GenerateToken() (string, error)

GenerateToken creates a secure one-time token for account verification

Types

type Claims

type Claims struct {
	jwt.RegisteredClaims
	Username    string `json:"preferred_username"`
	RealmAccess struct {
		Roles []string `json:"roles"`
	} `json:"realm_access"`
	Workspace string `json:"workspace"`
}

func ParseClaims

func ParseClaims(tokenStr string) (Claims, error)

Jump to

Keyboard shortcuts

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