dpop

package
v0.0.0-...-99ca00c Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HeaderType defines typ claim value
	HeaderType = "dpop+jwt"
	// ExpirationTreshold defines clock swrew tolerance
	ExpirationTreshold = 15 * time.Second
	// JTICodeLength defines JTI claim string length
	JTICodeLength = 16
)

Variables

This section is empty.

Functions

func CleanURL

func CleanURL(r *http.Request) string

CleanURL returns a cleanurl for DPoP proof.

func WithTokenConfirmation

func WithTokenConfirmation(jkt string) func(opts *options)

func WithTokenValue

func WithTokenValue(t string) func(opts *options)

Types

type Option

type Option func(*options)

type Prover

type Prover interface {
	Prove(htm string, htu string, opts ...Option) (string, error)
}

Prover describes prover contract

func DefaultProver

func DefaultProver(signer token.Serializer) Prover

DefaultProver uses the given signer to generate a DPoP Proof.

type Verifier

type Verifier interface {
	Verify(ctx context.Context, htm, htu, proof string, opts ...Option) (string, error)
}

Verifier describes proof verifier contract.

func DefaultVerifier

func DefaultVerifier(proofs storage.DPoP, verifier token.Verifier) Verifier

DefaultVerifier returns a verifier instance with in-memory cache for proof storage.

Jump to

Keyboard shortcuts

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