vfy

package
v0.0.0-...-142450a Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlgsDiffer = errors.New("jws alg and verification key alg are different")
View Source
var ErrLogsEmpty = errors.New("logs field cannot be empty")
View Source
var ErrNoKeyFound = errors.New("no key found")
View Source
var ErrRootKeyUnbound = errors.New("root key not properly committed")
View Source
var ErrTokenNonCompact = errors.New("token is not in compact serialization")

Functions

func NewKeyManager

func NewKeyManager(numThreads int) *keyManager

Creates a new key manager to verify [numThreads]-many tokens asynchronously.

Types

type ADEMToken

type ADEMToken struct {
	VerificationKey jwk.Key
	Headers         jws.Headers
	Token           jwt.Token
}

func MkADEMToken

func MkADEMToken(km *keyManager, sig *jws.Signature, t jwt.Token) (*ADEMToken, error)

type TokenVerificationResult

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

type VerificationResult

type VerificationResult byte
const ENDORSED VerificationResult = 4
const ENDORSED_TRUSTED VerificationResult = 7
const INVALID VerificationResult = 1
const ORGANIZATIONAL VerificationResult = 3
const ORGANIZATIONAL_TRUSTED VerificationResult = 6
const SIGNED VerificationResult = 2
const SIGNED_TRUSTED VerificationResult = 5
const UNSIGNED VerificationResult = 0

func (VerificationResult) String

func (vr VerificationResult) String() string

type VerificationResults

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

func ResultInvalid

func ResultInvalid() VerificationResults

func VerifyTokens

func VerifyTokens(rawTokens [][]byte, trustedKeys jwk.Set) VerificationResults

Verify a slice of ADEM tokens.

func (VerificationResults) Print

func (res VerificationResults) Print()

Jump to

Keyboard shortcuts

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