attestation

package
v0.0.0-...-6d5c26c Latest Latest
Warning

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

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

Documentation

Overview

Package attestation provides APIs for wallets to receive attestation credential.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAttestationPayloadHash

func GetAttestationPayloadHash(attestationPayloadJSON string) (string, error)

GetAttestationPayloadHash returns the SHA256 hash of the given attestation payload JSON. JSON is canonicalized according to RFC 8785.

Types

type Client

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

Client is a client for the attestation API.

func NewClient

func NewClient(
	args *CreateClientArgs,
) (*Client, error)

NewClient creates a new attestation client.

func (*Client) GetAttestationVC

func (c *Client) GetAttestationVC(
	vm *api.VerificationMethod,
	attestationPayloadJSON string,
) (*verifiable.Credential, error)

GetAttestationVC requests an attestation VC from the attestation service.

type CreateClientArgs

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

CreateClientArgs holds the arguments for creating a new client.

func NewCreateClientArgs

func NewCreateClientArgs(attestationURL string, crypto api.Crypto) *CreateClientArgs

NewCreateClientArgs creates a new CreateClientArgs object.

func (*CreateClientArgs) AddHeader

func (a *CreateClientArgs) AddHeader(header *api.Header) *CreateClientArgs

AddHeader adds the given HTTP header to all REST calls made to the issuer during the OpenID4CI flow.

func (*CreateClientArgs) DisableHTTPClientTLSVerify

func (a *CreateClientArgs) DisableHTTPClientTLSVerify() *CreateClientArgs

DisableHTTPClientTLSVerify disables tls verification, should be used only for test purposes.

func (*CreateClientArgs) DisableOpenTelemetry

func (a *CreateClientArgs) DisableOpenTelemetry() *CreateClientArgs

DisableOpenTelemetry disables OpenTelemetry.

func (*CreateClientArgs) SetDocumentLoader

func (a *CreateClientArgs) SetDocumentLoader(documentLoader api.LDDocumentLoader) *CreateClientArgs

SetDocumentLoader sets the document loader to use when parsing VCs received from the issuer. If no document loader is explicitly set, then a network-based loader will be used.

func (*CreateClientArgs) SetHTTPTimeoutNanoseconds

func (a *CreateClientArgs) SetHTTPTimeoutNanoseconds(timeout int64) *CreateClientArgs

SetHTTPTimeoutNanoseconds sets the timeout (in nanoseconds) for HTTP calls. Passing in 0 will disable timeouts.

func (*CreateClientArgs) SetMetricsLogger

func (a *CreateClientArgs) SetMetricsLogger(metricsLogger api.MetricsLogger) *CreateClientArgs

SetMetricsLogger sets a metrics logger to use.

Jump to

Keyboard shortcuts

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