Documentation ¶
Overview ¶
https://identity.foundation/presentation-exchange/#input-descriptor-object
SPDX-FileCopyrightText: 2023 DTIT and TLABS. SPDX-License-Identifier: Apache-2.0
Index ¶
- type Alg
- type Constraints
- type Description
- type Descriptor
- type Disclosure
- type Field
- type Filter
- type FilterResult
- type Format
- type FormatSpecification
- type InputDescriptor
- type PathNested
- type PresentationDefinition
- type PresentationSubmission
- type ProofType
- type RequestObject
- type ResponseParameters
- type Rule
- type StateResponse
- type SubmissionRequirement
- type ValidPresentation
- type VerifiedAttributes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Constraints ¶
type Constraints struct { LimitDisclosure Disclosure `json:"limit_disclosure,omitempty"` //The constraints object MAY contain a limit_disclosure property Fields []Field `json:"fields,omitempty"` //The constraints object MAY contain a fields property }
type Description ¶
type Descriptor ¶
type Descriptor struct { Id string `json:"id"` Format string `json:"format"` Path string `json:"path"` PathNested PathNested `json:"path_nested,omitempty"` }
type Disclosure ¶
type Disclosure string
const ( Required Disclosure = "required" Preferred Disclosure = "preferred" )
type FilterResult ¶
type FilterResult struct { Description `json:"description"` Credentials map[string]interface{} `json:"credentials"` }
type Format ¶
type Format struct { SDJWT *FormatSpecification `json:"verifiable-credential+sd-jwt,omitempty"` LDPVP *FormatSpecification `json:"ldp_vp,omitempty"` LDP *FormatSpecification `json:"ldp,omitempty"` LDPVC *FormatSpecification `json:"ldp_vc,omitempty"` JWT *FormatSpecification `json:"jwt,omitempty"` JWTVC *FormatSpecification `json:"jwt_vc,omitempty"` JWTVP *FormatSpecification `json:"jwt_vp,omitempty"` }
func (*Format) CheckFormats ¶
type FormatSpecification ¶
type InputDescriptor ¶
type InputDescriptor struct { Description Format Format `json:"format"` Constraints Constraints `json:"constraints"` Group []string `json:"group,omitempty"` }
func (*InputDescriptor) ApplyFieldFilter ¶ added in v0.1.3
func (descriptor *InputDescriptor) ApplyFieldFilter(value interface{}, filter Field) bool
func (*InputDescriptor) Filter ¶
func (descriptor *InputDescriptor) Filter(credential *types.Credential) (bool, error)
type PathNested ¶
type PresentationDefinition ¶
type PresentationDefinition struct { Description InputDescriptors []InputDescriptor `json:"input_descriptors"` Format Format `json:"format,omitempty"` SubmissionRequirements []SubmissionRequirement `json:"submission_requirements,omitempty"` }
func (*PresentationDefinition) CheckPresentationDefinition ¶
func (definition *PresentationDefinition) CheckPresentationDefinition() error
func (*PresentationDefinition) Filter ¶
func (definition *PresentationDefinition) Filter(credentials map[string]interface{}) ([]FilterResult, error)
type PresentationSubmission ¶
type PresentationSubmission struct { Id string `json:"id"` DefinitionId string `json:"definition_id"` DescriptorMap []Descriptor `json:"descriptor_map"` }
func CreateSubmission ¶
func CreateSubmission(definitionId string, selection []Description) PresentationSubmission
func (*PresentationSubmission) CheckSubmissionData ¶
func (submission *PresentationSubmission) CheckSubmissionData() error
type RequestObject ¶
type RequestObject struct { PresentationDefinition PresentationDefinition `json:"presentation_definition,omitempty"` PresentationDefinitionUri string `json:"presentation_definition_uri,omitempty"` Nonce string `json:"nonce"` ResponseType types.ResponseType `json:"response_type"` State string `json:"state,omitempty"` RedirectUri string `json:"redirect_uri"` ClientID string `json:"client_id"` ResponseUri string `json:"response_uri,omitempty"` ResponseMode types.ResponseMode `json:"response_mode"` }
type ResponseParameters ¶
type ResponseParameters struct { VpToken []byte `json:"vp_token"` PresentationSubmission PresentationSubmission `json:"presentation_submission"` }
type StateResponse ¶
type StateResponse struct { ID string `json:"id,omitempty"` State string `json:"state,omitempty"` VerifiedAttributes VerifiedAttributes `json:"verified_attributes,omitempty"` }
type SubmissionRequirement ¶
type ValidPresentation ¶
type VerifiedAttributes ¶
type VerifiedAttributes map[string]interface{}
Click to show internal directories.
Click to hide internal directories.