verifiable

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Config interface {
		oauth2.VerifiableCredentialsNonceLifespanProvider
	}
	NonceManager
}

func (*Handler) CanHandleTokenEndpointRequest

func (c *Handler) CanHandleTokenEndpointRequest(_ context.Context, requester oauth2.AccessRequester) bool

func (*Handler) CanSkipClientAuth

func (c *Handler) CanSkipClientAuth(context.Context, oauth2.AccessRequester) bool

func (*Handler) HandleTokenEndpointRequest

func (c *Handler) HandleTokenEndpointRequest(ctx context.Context, request oauth2.AccessRequester) error

func (*Handler) PopulateTokenEndpointResponse

func (c *Handler) PopulateTokenEndpointResponse(
	ctx context.Context,
	request oauth2.AccessRequester,
	response oauth2.AccessResponder,
) error

type NonceManager

type NonceManager interface {
	// NewNonce creates a new nonce bound to the access token valid until the given expiry time.
	NewNonce(ctx context.Context, accessToken string, expiresAt time.Time) (string, error)

	// IsNonceValid checks if the given nonce is valid for the given access token and not expired.
	IsNonceValid(ctx context.Context, accessToken string, nonce string) error
}

Jump to

Keyboard shortcuts

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