issuer

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClaimTypeNaturalPerson     ClaimType = "NaturalPerson"
	ClaimTypeIdentityProviders ClaimType = "IdentityProviders"

	EmptyStringField  = "none"
	EmptyIntegerField = 0
)

Variables

View Source
var (
	ErrUnexpectedStatusCode = errors.New("unexpected status code")
)

Functions

This section is empty.

Types

type ClaimType

type ClaimType string

func (ClaimType) String

func (c ClaimType) String() string

type CreateCredentialRequest

type CreateCredentialRequest struct {
	CredentialSchema  string                              `json:"credentialSchema"`
	CredentialSubject *IdentityProvidersCredentialSubject `json:"credentialSubject"`
	Expiration        *time.Time                          `json:"expiration,omitempty"`
	MtProof           *bool                               `json:"mtProof,omitempty"`
	SignatureProof    *bool                               `json:"signatureProof,omitempty"`
	Type              string                              `json:"type"`
}

CreateCredentialRequest defines model for CreateCredentialRequest.

type IdentityProviderName

type IdentityProviderName string
const (
	UnstoppableDomainsProviderName IdentityProviderName = "UnstoppableDomains"
	CivicProviderName              IdentityProviderName = "Civic"
	GitcoinProviderName            IdentityProviderName = "GitcoinPassport"
	WorldCoinProviderName          IdentityProviderName = "Worldcoin"
)

func (IdentityProviderName) String

func (ipn IdentityProviderName) String() string

type IdentityProvidersCredentialSubject

type IdentityProvidersCredentialSubject struct {
	IdentityID               string               `json:"id"`
	Provider                 IdentityProviderName `json:"provider"`
	IsNatural                int64                `json:"isNatural"`
	Address                  string               `json:"address"`
	GitcoinPassportScore     string               `json:"gitcoinPassportScore"`
	WorldCoinScore           string               `json:"worldcoinScore"`
	UnstoppableDomain        string               `json:"unstoppableDomain"`
	CivicGatekeeperNetworkID int64                `json:"civicGatekeeperNetworkId"`
	KYCAdditionalData        string               `json:"kycAdditionalData"`
}

func NewEmptyIdentityProvidersCredentialSubject

func NewEmptyIdentityProvidersCredentialSubject() *IdentityProvidersCredentialSubject

type IsNaturalPersonCredentialSubject

type IsNaturalPersonCredentialSubject struct {
	IsNatural string `json:"is_natural"`
}

type IssueClaimResponse

type IssueClaimResponse struct {
	Data IssueClaimResponseData `json:"data"`
}

type IssueClaimResponseData

type IssueClaimResponseData struct {
	resources.Key
}

type Issuer

type Issuer interface {
	IssueClaim(
		identityID iden3core.ID,
		claimType ClaimType,
		credentialSubject interface{},
	) (*IssueClaimResponse, error)
	SchemaType() string
	SchemaURL() string
}

func New

func New(log *logan.Entry, config *config.Issuer) Issuer

type UUIDResponse

type UUIDResponse struct {
	Id string `json:"id"`
}

func (UUIDResponse) IssueClaimResponse

func (r UUIDResponse) IssueClaimResponse() IssueClaimResponse

Jump to

Keyboard shortcuts

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