authorization

package
v0.0.0-...-87a1d56 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	Email       string   `json:"email"`
	Permissions []string `json:"permissions"`
	jwt.RegisteredClaims
}

func ClaimsForUser

func ClaimsForUser(user User) *Claims

type JWTMinter

type JWTMinter struct {
	Privkey any
}

func NewMinter

func NewMinter(key interface{}) *JWTMinter

func (JWTMinter) Mint

func (m JWTMinter) Mint(claims Claims) (string, error)

type JWTValidator

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

func NewValidator

func NewValidator(pubkey ed25519.PublicKey) *JWTValidator

func (JWTValidator) Validate

func (v JWTValidator) Validate(token string) (*jwt.Token, error)

type User

type User struct {
	Email       string
	Permissions []string
}

Jump to

Keyboard shortcuts

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