jwt

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name    = "jwt"
	Type    = "https://witness.dev/attestations/jwt/v0.1"
	RunType = attestation.PreMaterialRunType
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Attestor

type Attestor struct {
	Claims     map[string]interface{} `json:"claims"`
	VerifiedBy VerificationInfo       `json:"verifiedBy,omitempty"`
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Attestor

func (*Attestor) Attest

func (a *Attestor) Attest(ctx *attestation.AttestationContext) error

func (*Attestor) Name

func (a *Attestor) Name() string

func (*Attestor) RunType

func (a *Attestor) RunType() attestation.RunType

func (*Attestor) Schema added in v0.4.0

func (a *Attestor) Schema() *jsonschema.Schema

func (*Attestor) Type

func (a *Attestor) Type() string

type ErrInvalidToken

type ErrInvalidToken string

func (ErrInvalidToken) Error

func (e ErrInvalidToken) Error() string

type Option

type Option func(a *Attestor)

func WithJWKSUrl

func WithJWKSUrl(url string) Option

func WithToken

func WithToken(token string) Option

type VerificationInfo

type VerificationInfo struct {
	JWKSUrl string          `json:"jwksUrl"`
	JWK     jose.JSONWebKey `json:"jwk"`
}

Jump to

Keyboard shortcuts

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