Documentation ¶
Index ¶
- Constants
- type AttestationService
- type BatchCredentialRequest
- type BatchCredentialResponse
- type CWTProofBuilder
- type CreateProofRequest
- type CredentialDefinition
- type CredentialRequest
- type CredentialResponse
- type CredentialResponseBatchCredential
- type CredentialResponseEncryption
- type Flow
- type FlowType
- type JWTProofBuilder
- type JWTProofFn
- type LDPProofBuilder
- type Opt
- func WithBatchCredentialIssuance() Opt
- func WithClientID(clientID string) Opt
- func WithCredentialConfigurationIDs(credentialConfigurationIDs []string) Opt
- func WithCredentialFilter(credentialType string, oidcCredentialFormat vcsverifiable.OIDCFormat) Opt
- func WithCredentialOffer(credentialOffer string) Opt
- func WithEnableDiscoverableClientID() Opt
- func WithFlowType(flowType FlowType) Opt
- func WithIssuerState(issuerState string) Opt
- func WithPin(pin string) Opt
- func WithProofBuilder(proofBuilder ProofBuilder) Opt
- func WithRedirectURI(redirectURI string) Opt
- func WithScopes(scopes []string) Opt
- func WithUserLogin(userLogin string) Opt
- func WithUserPassword(userPassword string) Opt
- func WithWalletDIDIndex(idx int) Opt
- type PerfInfo
- type Proof
- type ProofBuilder
- type ProofClaims
- type TrustRegistry
Constants ¶
View Source
const ( FlowTypeAuthorizationCode FlowType = "authorization_code" FlowTypeWalletInitiated = "wallet_initiated" FlowTypePreAuthorizedCode = "pre-authorized_code" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttestationService ¶
type AttestationService interface {
GetAttestation(ctx context.Context, request attestation.GetAttestationRequest) (string, error)
}
type BatchCredentialRequest ¶
type BatchCredentialRequest struct {
CredentialRequests []CredentialRequest `json:"credential_requests"`
}
type BatchCredentialResponse ¶
type BatchCredentialResponse struct { // JSON string containing a nonce to be used to create a proof of possession of key material when requesting a Credential. CNonce *string `json:"c_nonce,omitempty"` // JSON integer denoting the lifetime in seconds of the c_nonce. CNonceExpiresIn *int `json:"c_nonce_expires_in,omitempty"` CredentialResponses []CredentialResponseBatchCredential `json:"credential_responses"` }
BatchCredentialResponse for OIDC Batch Credential response.
type CWTProofBuilder ¶
type CWTProofBuilder struct { }
func NewCWTProofBuilder ¶
func NewCWTProofBuilder() *CWTProofBuilder
func (*CWTProofBuilder) Build ¶
func (b *CWTProofBuilder) Build( ctx context.Context, req *CreateProofRequest, ) (*Proof, error)
type CreateProofRequest ¶
type CredentialDefinition ¶
type CredentialDefinition struct { // For ldp_vc only. Array as defined in https://www.w3.org/TR/vc-data-model/#contexts. Context *[]string `json:"@context,omitempty"` // An object containing a list of name/value pairs, where each name identifies a claim offered in the Credential. The value can be another such object (nested data structures), or an array of such objects. CredentialSubject *map[string]interface{} `json:"credentialSubject,omitempty"` // Array designating the types a certain credential type supports Type []string `json:"type"` }
CredentialDefinition contains the detailed description of the credential type.
type CredentialRequest ¶
type CredentialRequest struct { Format verifiable.OIDCFormat `json:"format,omitempty"` CredentialDefinition *CredentialDefinition `json:"credential_definition,omitempty"` CredentialIdentifier *string `json:"credential_identifier,omitempty"` Proof Proof `json:"proof,omitempty"` CredentialResponseEncryption *CredentialResponseEncryption `json:"credential_response_encryption,omitempty"` }
type CredentialResponse ¶
type CredentialResponse struct { AcceptanceToken string `json:"acceptance_token,omitempty"` CNonce string `json:"c_nonce,omitempty"` CNonceExpiresIn int `json:"c_nonce_expires_in,omitempty"` Credential interface{} `json:"credential"` Format verifiable.OIDCFormat `json:"format"` NotificationId *string `json:"notification_id"` }
type CredentialResponseBatchCredential ¶
type CredentialResponseBatchCredential struct { // Contains issued Credential. Credential interface{} `json:"credential"` // String identifying an issued Credential that the Wallet includes in the acknowledgement request. NotificationId *string `json:"notification_id,omitempty"` // OPTIONAL. String identifying a Deferred Issuance transaction. This claim is contained in the response if the Credential Issuer was unable to immediately issue the Credential. The value is subsequently used to obtain the respective Credential with the Deferred Credential Endpoint. TransactionId *string `json:"transaction_id,omitempty"` }
type CredentialResponseEncryption ¶
type CredentialResponseEncryption struct { // JWE alg algorithm for encrypting the Credential Response. Alg string `json:"alg"` // JWE enc algorithm for encrypting the Credential Response. Enc string `json:"enc"` // Object containing a single public key as a JWK used for encrypting the Credential Response. Jwk string `json:"jwk"` }
CredentialResponseEncryption containing information for encrypting the Credential Response.
type Flow ¶
type Flow struct {
// contains filtered or unexported fields
}
func (*Flow) Run ¶
func (f *Flow) Run(ctx context.Context) ([]*verifiable.Credential, error)
type JWTProofBuilder ¶
type JWTProofBuilder struct {
// contains filtered or unexported fields
}
func NewJWTProofBuilder ¶
func NewJWTProofBuilder() *JWTProofBuilder
func (*JWTProofBuilder) Build ¶
func (b *JWTProofBuilder) Build( ctx context.Context, req *CreateProofRequest, ) (*Proof, error)
func (*JWTProofBuilder) WithCustomProofFn ¶
func (b *JWTProofBuilder) WithCustomProofFn( proofFn JWTProofFn, ) *JWTProofBuilder
type JWTProofFn ¶
type JWTProofFn func( ctx context.Context, req *CreateProofRequest, ) (string, error)
type LDPProofBuilder ¶
type LDPProofBuilder struct {
// contains filtered or unexported fields
}
func NewLDPProofBuilder ¶
func NewLDPProofBuilder() *LDPProofBuilder
func (*LDPProofBuilder) Build ¶
func (b *LDPProofBuilder) Build( _ context.Context, req *CreateProofRequest, ) (*Proof, error)
type Opt ¶
type Opt func(opts *options)
func WithBatchCredentialIssuance ¶
func WithBatchCredentialIssuance() Opt
func WithClientID ¶
func WithCredentialFilter ¶
func WithCredentialFilter(credentialType string, oidcCredentialFormat vcsverifiable.OIDCFormat) Opt
func WithCredentialOffer ¶
func WithEnableDiscoverableClientID ¶
func WithEnableDiscoverableClientID() Opt
func WithFlowType ¶
func WithIssuerState ¶
func WithProofBuilder ¶
func WithProofBuilder(proofBuilder ProofBuilder) Opt
func WithRedirectURI ¶
func WithScopes ¶
func WithUserLogin ¶
func WithUserPassword ¶
func WithWalletDIDIndex ¶
type PerfInfo ¶
type PerfInfo struct { GetIssuerCredentialsOIDCConfig time.Duration `json:"vci_get_issuer_credentials_oidc_config"` GetAccessToken time.Duration `json:"vci_get_access_token"` GetCredential time.Duration `json:"vci_get_credential"` CredentialsAck time.Duration `json:"vci_credentials_ack"` VcsCIFlowDuration time.Duration `json:"_vcs_ci_flow_duration"` }
type ProofBuilder ¶
type ProofBuilder interface { Build( ctx context.Context, req *CreateProofRequest, ) (*Proof, error) }
type ProofClaims ¶
type TrustRegistry ¶
type TrustRegistry interface { ValidateIssuer( ctx context.Context, issuerDID string, issuerDomain string, credentialOffers []trustregistry.CredentialOffer, ) (bool, error) }
Click to show internal directories.
Click to hide internal directories.