walletrunner

package
v0.0.0-...-9a4d363 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AriesServices

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

func (*AriesServices) Close

func (p *AriesServices) Close() error

Close frees resources being maintained by the framework.

func (*AriesServices) Crypto

func (p *AriesServices) Crypto() crypto.Crypto

func (*AriesServices) JSONLDDocumentLoader

func (p *AriesServices) JSONLDDocumentLoader() jsonld.DocumentLoader

func (*AriesServices) KMS

func (p *AriesServices) KMS() kms.KeyManager

func (*AriesServices) MediaTypeProfiles

func (p *AriesServices) MediaTypeProfiles() []string

func (*AriesServices) SetStorageProvider

func (p *AriesServices) SetStorageProvider(sp storage.Provider)

func (*AriesServices) StorageProvider

func (p *AriesServices) StorageProvider() storage.Provider

func (*AriesServices) VDRegistry

func (p *AriesServices) VDRegistry() vdrapi.Registry

type IDTokenClaims

type IDTokenClaims struct {
	VPToken IDTokenVPToken `json:"_vp_token"`
	Nonce   string         `json:"nonce"`
	Exp     int64          `json:"exp"`
	Iss     string         `json:"iss"`
}

type IDTokenVPToken

type IDTokenVPToken struct {
	PresentationSubmission *presexch.PresentationSubmission `json:"presentation_submission"`
}

type InitiateOIDC4VPResponse

type InitiateOIDC4VPResponse struct {
	AuthorizationRequest string `json:"authorizationRequest"`
	TxId                 string `json:"txID"`
}

type JWSSigner

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

func NewJWSSigner

func NewJWSSigner(keyID string, signingAlgorithm string, signer vc.SignerAlgorithm) *JWSSigner

func (*JWSSigner) Headers

func (s *JWSSigner) Headers() jose.Headers

Headers provides JWS headers. "alg" header must be provided (see https://tools.ietf.org/html/rfc7515#section-4.1)

func (*JWSSigner) Sign

func (s *JWSSigner) Sign(data []byte) ([]byte, error)

Sign signs.

type RequestObject

type RequestObject struct {
	JTI          string                    `json:"jti"`
	IAT          int64                     `json:"iat"`
	ResponseType string                    `json:"response_type"`
	ResponseMode string                    `json:"response_mode"`
	Scope        string                    `json:"scope"`
	Nonce        string                    `json:"nonce"`
	ClientID     string                    `json:"client_id"`
	RedirectURI  string                    `json:"redirect_uri"`
	State        string                    `json:"state"`
	Exp          int64                     `json:"exp"`
	Registration RequestObjectRegistration `json:"registration"`
	Claims       RequestObjectClaims       `json:"claims"`
}

type RequestObjectClaims

type RequestObjectClaims struct {
	VPToken VPToken `json:"vp_token"`
}

type RequestObjectRegistration

type RequestObjectRegistration struct {
	ClientName                  string           `json:"client_name"`
	SubjectSyntaxTypesSupported []string         `json:"subject_syntax_types_supported"`
	VPFormats                   *presexch.Format `json:"vp_formats"`
	ClientPurpose               string           `json:"client_purpose"`
}

type Service

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

func New

func New(vcProviderType string, opts ...vcprovider.ConfigOption) (*Service, error)

func (*Service) CreateWallet

func (s *Service) CreateWallet() error

func (*Service) GetConfig

func (s *Service) GetConfig() *vcprovider.Config

func (*Service) NewVPFlowExecutor

func (s *Service) NewVPFlowExecutor() *VPFlowExecutor

func (*Service) RunOIDC4VPFlow

func (s *Service) RunOIDC4VPFlow(authorizationRequest string) error

func (*Service) SaveCredentialInWallet

func (s *Service) SaveCredentialInWallet(vc []byte) error

type VPFlowExecutor

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

func (*VPFlowExecutor) CreateAuthorizedResponse

func (e *VPFlowExecutor) CreateAuthorizedResponse() (string, error)

func (*VPFlowExecutor) FetchRequestObject

func (e *VPFlowExecutor) FetchRequestObject(authorizationRequest string) (string, error)

func (*VPFlowExecutor) InitiateInteraction

func (e *VPFlowExecutor) InitiateInteraction(url, authToken string) (*InitiateOIDC4VPResponse, error)

func (*VPFlowExecutor) QueryCredentialFromWallet

func (e *VPFlowExecutor) QueryCredentialFromWallet() error

func (*VPFlowExecutor) RequestPresentation

func (e *VPFlowExecutor) RequestPresentation() *verifiable.Presentation

func (*VPFlowExecutor) RetrieveInteractionsClaim

func (e *VPFlowExecutor) RetrieveInteractionsClaim(url, authToken string) error

func (*VPFlowExecutor) SendAuthorizedResponse

func (e *VPFlowExecutor) SendAuthorizedResponse(responseBody string) error

func (*VPFlowExecutor) VerifyAuthorizationRequestAndDecodeClaims

func (e *VPFlowExecutor) VerifyAuthorizationRequestAndDecodeClaims(rawRequestObject string) error

type VPToken

type VPToken struct {
	PresentationDefinition *presexch.PresentationDefinition `json:"presentation_definition"`
}

type VPTokenClaims

type VPTokenClaims struct {
	VP    *verifiable.Presentation `json:"vp"`
	Nonce string                   `json:"nonce"`
	Exp   int64                    `json:"exp"`
	Iss   string                   `json:"iss"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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