profile

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientAttestationCheck added in v1.6.0

type ClientAttestationCheck struct {
	PolicyURL string `json:"policyUrl"`
}

ClientAttestationCheck stores Client Attestation check configuration.

type CredentialChecks

type CredentialChecks struct {
	Proof            bool                   `json:"proof,omitempty"`
	Format           []vcsverifiable.Format `json:"format,omitempty"`
	Status           bool                   `json:"status,omitempty"`
	CredentialExpiry bool                   `json:"credentialExpiry,omitempty"`
	Strict           bool                   `json:"strict,omitempty"`
	LinkedDomain     bool                   `json:"linkedDomain,omitempty"`
	IssuerTrustList  map[string]TrustList   `json:"issuerTrustList,omitempty"`
}

CredentialChecks are checks to be performed during credential verification.

type CredentialDisplay added in v1.3.0

type CredentialDisplay struct {
	Name            string `json:"name"`
	Locale          string `json:"locale"`
	URL             string `json:"url"`
	BackgroundColor string `json:"background_color"`
	TextColor       string `json:"text_color"`
}

type CredentialMetaData

type CredentialMetaData struct {
	CredentialsSupported []map[string]interface{} `json:"credentials_supported"`
	Display              []*CredentialDisplay     `json:"display"`
}

type CredentialTemplate

type CredentialTemplate struct {
	Contexts                            []string                     `json:"contexts"`
	ID                                  string                       `json:"id"`
	Type                                string                       `json:"type"`
	CredentialSubject                   json.RawMessage              `json:"credentialSubject"`
	CredentialDefaultExpirationDuration *time.Duration               `json:"credentialDefaultExpirationDuration"`
	Checks                              CredentialTemplateChecks     `json:"checks"`
	SdJWT                               *SelectiveDisclosureTemplate `json:"sdJWT"`
	JSONSchema                          string                       `json:"jsonSchema,omitempty"`
	JSONSchemaID                        string                       `json:"jsonSchemaID,omitempty"`
}

type CredentialTemplateChecks

type CredentialTemplateChecks struct {
	Strict bool `json:"strict,omitempty"`
}

type ID

type ID = string // ID of the Profile.

type IssuanceChecks added in v1.6.0

type IssuanceChecks struct {
	ClientAttestationCheck ClientAttestationCheck `json:"clientAttestationCheck,omitempty"`
}

IssuanceChecks are checks to be performed for issuance credentials and presentations.

type Issuer

type Issuer struct {
	ID                  ID                    `json:"id"`
	Version             Version               `json:"version"`
	GroupID             ID                    `json:"groupID"`
	Name                string                `json:"name,omitempty"`
	URL                 string                `json:"url,omitempty"`
	Active              bool                  `json:"active"`
	OIDCConfig          *OIDCConfig           `json:"oidcConfig"`
	OrganizationID      string                `json:"organizationID,omitempty"`
	VCConfig            *VCConfig             `json:"vcConfig"`
	KMSConfig           *vcskms.Config        `json:"kmsConfig"`
	SigningDID          *SigningDID           `json:"signingDID"`
	CredentialTemplates []*CredentialTemplate `json:"credentialTemplates,omitempty"`
	WebHook             string                `json:"webHook,omitempty"`
	CredentialMetaData  *CredentialMetaData   `json:"credentialMetadata"`
	Checks              IssuanceChecks        `json:"checks"`
}

Issuer profile.

type Logo struct {
	URL             string `json:"url"`
	AlternativeText string `json:"alt_text"`
}

type Method

type Method string // DID method of the Profile.
const (
	WebDIDMethod Method = "web"
	KeyDIDMethod Method = key.DIDMethod
	OrbDIDMethod Method = "orb"
)

type OIDC4VPConfig

type OIDC4VPConfig struct {
	ROSigningAlgorithm vcsverifiable.SignatureType `json:"roSigningAlgorithm,omitempty"`
	DIDMethod          Method                      `json:"didMethod,omitempty"`
	KeyType            kms.KeyType                 `json:"keyType,omitempty"`
}

OIDC4VPConfig store config for verifier did that used to sign request object in oidc4vp process.

type OIDCConfig added in v1.1.0

type OIDCConfig struct {
	IssuerWellKnownURL                         string   `json:"issuer_well_known"`
	ClientID                                   string   `json:"client_id"`
	ClientSecretHandle                         string   `json:"client_secret_handle"`
	ScopesSupported                            []string `json:"scopes_supported"`
	GrantTypesSupported                        []string `json:"grant_types_supported"`
	ResponseTypesSupported                     []string `json:"response_types_supported"`
	TokenEndpointAuthMethodsSupported          []string `json:"token_endpoint_auth_methods_supported"`
	EnableDynamicClientRegistration            bool     `json:"enable_dynamic_client_registration"`
	EnableDiscoverableClientIDScheme           bool     `json:"enable_discoverable_client_id_scheme"`
	PreAuthorizedGrantAnonymousAccessSupported bool     `json:"pre-authorized_grant_anonymous_access_supported"`
	WalletInitiatedAuthFlowSupported           bool     `json:"wallet_initiated_auth_flow_supported"`
	SignedCredentialOfferSupported             bool     `json:"signed_credential_offer_supported"`
	SignedIssuerMetadataSupported              bool     `json:"signed_issuer_metadata_supported"`
	ClaimsEndpoint                             string   `json:"claims_endpoint"`
}

OIDCConfig represents issuer's OIDC configuration.

type PresentationChecks

type PresentationChecks struct {
	Proof     bool                   `json:"proof,omitempty"`
	VCSubject bool                   `json:"vcSubject,omitempty"`
	Format    []vcsverifiable.Format `json:"format,omitempty"`
}

PresentationChecks are checks to be performed during presentation verification.

type SelectiveDisclosureTemplate added in v1.2.0

type SelectiveDisclosureTemplate struct {
	Version                   common.SDJWTVersion `json:"version"`
	AlwaysInclude             []string            `json:"alwaysInclude"`
	RecursiveClaims           []string            `json:"recursiveClaims"`
	NonSelectivelyDisclosable []string            `json:"nonSelectivelyDisclosable"`
}

type SigningDID

type SigningDID struct {
	DID            string `json:"did,omitempty"`
	Creator        string `json:"creator,omitempty"`
	KMSKeyID       string `json:"kmsKeyID,omitempty"`
	UpdateKeyURL   string `json:"updateKeyURL,omitempty"`
	RecoveryKeyURL string `json:"recoveryKeyURL,omitempty"`
}

SigningDID contains information about profile signing did.

type StatusConfig

type StatusConfig struct {
	Type    vc.StatusType `json:"type"`
	Disable bool          `json:"disable"`
}

StatusConfig represents the VC status configuration.

type TrustList added in v1.5.0

type TrustList struct {
	CredentialTypes []string `json:"credentialTypes,omitempty"`
}

TrustList contains list of configuration that verifier is trusted to accept.

type VCConfig

type VCConfig struct {
	Format                  vcsverifiable.Format               `json:"format,omitempty"`
	SigningAlgorithm        vcsverifiable.SignatureType        `json:"signingAlgorithm,omitempty"`
	KeyType                 kms.KeyType                        `json:"keyType,omitempty"`
	DIDMethod               Method                             `json:"didMethod,omitempty"`
	SignatureRepresentation verifiable.SignatureRepresentation `json:"signatureRepresentation,omitempty"`
	Status                  StatusConfig                       `json:"status,omitempty"`
	Context                 []string                           `json:"context,omitempty"`
	SDJWT                   vc.SDJWT                           `json:"sdjwt,omitempty"`
	DataIntegrityProof      vc.DataIntegrityProofConfig        `json:"dataIntegrityProof,omitempty"`
}

VCConfig describes how to sign verifiable credentials.

type VerificationChecks

type VerificationChecks struct {
	Credential             CredentialChecks       `json:"credential,omitempty"`
	Presentation           *PresentationChecks    `json:"presentation,omitempty"`
	ClientAttestationCheck ClientAttestationCheck `json:"clientAttestationCheck,omitempty"`
}

VerificationChecks are checks to be performed for verifying credentials and presentations.

type Verifier

type Verifier struct {
	ID                      ID                                 `json:"id,omitempty"`
	Version                 Version                            `json:"version,omitempty"`
	Name                    string                             `json:"name,omitempty"`
	URL                     string                             `json:"url,omitempty"`
	LogoURL                 string                             `json:"logoURL,omitempty"`
	Active                  bool                               `json:"active,omitempty"`
	OrganizationID          string                             `json:"organizationID,omitempty"`
	Checks                  *VerificationChecks                `json:"checks,omitempty"`
	OIDCConfig              *OIDC4VPConfig                     `json:"oidcConfig,omitempty"`
	KMSConfig               *vcskms.Config                     `json:"kmsConfig,omitempty"`
	SigningDID              *SigningDID                        `json:"signingDID,omitempty"`
	PresentationDefinitions []*presexch.PresentationDefinition `json:"presentationDefinitions,omitempty"`
	WebHook                 string                             `json:"webHook,omitempty"`
}

Verifier profile.

type Version

type Version = string // Profile version.

Jump to

Keyboard shortcuts

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