Documentation ¶
Index ¶
- Constants
- type AuthorizationDetails
- type ClaimData
- type ClaimDataType
- type Config
- type CredentialComposeConfiguration
- type CredentialComposer
- type CredentialDefinition
- type Opts
- type PrepareCredentialService
- type PrepareCredentialServiceConfig
- type PrepareCredentialsRequest
- type Service
- type ServiceInterface
- type Transaction
- type TransactionData
- type TransactionState
- type TxCredentialConfiguration
- type TxID
Constants ¶
const ( ClaimDataTypeClaims = ClaimDataType(0) ClaimDataTypeVC = ClaimDataType(1) )
const ( TransactionStateUnknown = TransactionState(0) TransactionStateIssuanceInitiated = TransactionState(1) TransactionStatePreAuthCodeValidated = TransactionState(2) // pre-auth only TransactionStateAwaitingIssuerOIDCAuthorization = TransactionState(3) // auth only TransactionStateIssuerOIDCAuthorizationDone = TransactionState(4) TransactionStateCredentialsIssued = TransactionState(5) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizationDetails ¶ added in v1.11.0
type AuthorizationDetails struct { Type string Format vcsverifiable.OIDCFormat Locations []string CredentialConfigurationID string CredentialDefinition *CredentialDefinition CredentialIdentifiers []string }
AuthorizationDetails represents the domain model for Authorization Details request. This object is used to convey the details about the Credentials the Wallet wants to obtain.
func (*AuthorizationDetails) ToDTO ¶ added in v1.11.0
func (ad *AuthorizationDetails) ToDTO() common.AuthorizationDetails
type ClaimData ¶ added in v1.11.0
type ClaimData struct {
EncryptedData *dataprotect.EncryptedData `json:"encrypted_data"`
}
ClaimData represents user claims in pre-auth code flow.
type ClaimDataType ¶ added in v1.11.0
type ClaimDataType int16
type Config ¶
type Config struct { VCStatusManager vcStatusManager Crypto vcCrypto KMSRegistry kmsRegistry }
type CredentialComposeConfiguration ¶ added in v1.11.0
type CredentialComposer ¶ added in v1.11.0
type CredentialComposer struct { }
func NewCredentialComposer ¶ added in v1.11.0
func NewCredentialComposer() *CredentialComposer
func (*CredentialComposer) Compose ¶ added in v1.11.0
func (c *CredentialComposer) Compose( _ context.Context, credential *verifiable.Credential, req *PrepareCredentialsRequest, ) (*verifiable.Credential, error)
type CredentialDefinition ¶ added in v1.11.0
type CredentialDefinition struct { // For ldp_vc only. Array as defined in https://www.w3.org/TR/vc-data-model/#contexts. Context []string CredentialSubject map[string]interface{} Type []string }
CredentialDefinition contains the detailed description of the credential type.
type Opts ¶ added in v1.5.0
type Opts func(opts *issueCredentialOpts)
Opts is signing credential option.
func WithCryptoOpts ¶ added in v1.5.0
func WithCryptoOpts(cryptoOpts []crypto.SigningOpts) Opts
WithCryptoOpts is an option to pass crypto.SigningOpts.
func WithSkipIDPrefix ¶ added in v1.8.0
func WithSkipIDPrefix() Opts
WithSkipIDPrefix is an option to skip ID prefix.
func WithTransactionID ¶ added in v1.5.0
WithTransactionID is an option to pass transactionID.
type PrepareCredentialService ¶ added in v1.11.0
type PrepareCredentialService struct {
// contains filtered or unexported fields
}
func NewPrepareCredentialService ¶ added in v1.11.0
func NewPrepareCredentialService( cfg *PrepareCredentialServiceConfig, ) *PrepareCredentialService
func (*PrepareCredentialService) CreateRefreshService ¶ added in v1.11.0
func (s *PrepareCredentialService) CreateRefreshService( _ context.Context, cred *verifiable.Credential, req *PrepareCredentialsRequest, ) *verifiable.TypedID
func (*PrepareCredentialService) PrepareCredential ¶ added in v1.11.0
func (s *PrepareCredentialService) PrepareCredential( ctx context.Context, req *PrepareCredentialsRequest, ) (*verifiable.Credential, error)
type PrepareCredentialServiceConfig ¶ added in v1.11.0
type PrepareCredentialServiceConfig struct { VcsAPIURL string Composer composer }
type PrepareCredentialsRequest ¶ added in v1.11.0
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) IssueCredential ¶
func (s *Service) IssueCredential( ctx context.Context, credential *verifiable.Credential, profile *profileapi.Issuer, opts ...Opts, ) (*verifiable.Credential, error)
type ServiceInterface ¶
type ServiceInterface interface { IssueCredential( ctx context.Context, credential *verifiable.Credential, profile *profileapi.Issuer, opts ...Opts, ) (*verifiable.Credential, error) }
type Transaction ¶ added in v1.11.0
type Transaction struct { ID TxID TransactionData }
Transaction is the credential issuance transaction. Issuer creates a transaction to convey the intention of issuing a credential with the given parameters. The transaction is stored in the transaction store and its status is updated as the credential issuance progresses.
type TransactionData ¶ added in v1.11.0
type TransactionData struct { ProfileID profileapi.ID ProfileVersion profileapi.Version IsPreAuthFlow bool PreAuthCode string OrgID string AuthorizationEndpoint string PushedAuthorizationRequestEndpoint string TokenEndpoint string OpState string RedirectURI string GrantType string ResponseType string Scope []string IssuerAuthCode string IssuerToken string State TransactionState WebHookURL string UserPin string DID string WalletInitiatedIssuance bool CredentialConfiguration []*TxCredentialConfiguration RefreshServiceEnabled bool }
TransactionData is the transaction data stored in the underlying storage.
type TransactionState ¶ added in v1.11.0
type TransactionState int16
type TxCredentialConfiguration ¶ added in v1.11.0
type TxCredentialConfiguration struct { ID string CredentialTemplate *profileapi.CredentialTemplate OIDCCredentialFormat vcsverifiable.OIDCFormat ClaimEndpoint string ClaimDataID string ClaimDataType ClaimDataType CredentialName string CredentialDescription string CredentialExpiresAt *time.Time PreAuthCodeExpiresAt *time.Time CredentialConfigurationID string // AuthorizationDetails may be defined on Authorization Request via using "authorization_details" parameter. // If "scope" param is used, this field will stay empty. AuthorizationDetails *AuthorizationDetails CredentialComposeConfiguration *CredentialComposeConfiguration }