Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type GetStampsResponse ¶
type GetStampsResponse struct {
Items []Stamp `json:"items"`
}
GetStampsResponse is a data that is returned by Gitcoin Passport with stamps
type GitcoinPassport ¶
type GitcoinPassport struct {
// contains filtered or unexported fields
}
GitcoinPassport is an identity provider
func NewIdentityProvider ¶
func NewIdentityProvider( logger *logan.Entry, settings *config.GitcoinPassportSettings, masterQ data.MasterQ, ctx context.Context, issuer issuer.Issuer, ) *GitcoinPassport
NewIdentityProvider creates a new GitcoinPassport instance
func (*GitcoinPassport) Verify ¶
func (g *GitcoinPassport) Verify( user *data.User, verifyDataRaw []byte, ) (*issuer.IdentityProvidersCredentialSubject, []byte, error)
type ProviderData ¶
type ProviderData struct { Address string `json:"address"` Score string `json:"score"` Stamps []Stamp `json:"stamps"` }
ProviderData is a data that is returned by Gitcoin Passport
type Stamp ¶
type Stamp struct { Version string `json:"version"` Credential struct { Type []string `json:"type"` Proof struct { Jws string `json:"jws"` Type string `json:"type"` Created string `json:"created"` ProofPurpose string `json:"proofPurpose"` VerificationMethod string `json:"verificationMethod"` } `json:"proof"` Issuer string `json:"issuer"` Context []string `json:"@context"` IssuanceDate string `json:"issuanceDate"` ExpirationDate string `json:"expirationDate"` CredentialSubject struct { Id string `json:"id"` Hash string `json:"hash"` Context []struct { Hash string `json:"hash"` Provider string `json:"provider"` } `json:"@context"` Provider string `json:"provider"` } `json:"credentialSubject"` } `json:"credential"` Metadata *struct { Group string `json:"group"` Platform struct { Id string `json:"id"` Icon string `json:"icon"` Name string `json:"name"` Description string `json:"description"` ConnectMessage string `json:"connectMessage"` } `json:"platform"` Name string `json:"name"` Description string `json:"description"` Hash string `json:"hash"` } `json:"metadata,omitempty"` }
Stamp is a user data that is returned by Gitcoin Passport
type SubmitPassportRequest ¶
type SubmitPassportRequest struct { ScorerId int `json:"scorer_id"` Address string `json:"address"` }
SubmitPassportRequest is a data that is sent to Gitcoin Passport
type SubmitPassportResponse ¶
type SubmitPassportResponse struct { Address string `json:"address"` Score string `json:"score"` Status string `json:"status"` }
SubmitPassportResponse is a data that is returned by Gitcoin Passport with status of request
type VerificationData ¶
type VerificationData resources.GitcoinPassportData
VerificationData is a data that is required by Gitcoin Passport to verify a user
func (VerificationData) Validate ¶
func (v VerificationData) Validate() error
Validate is a method that validates VerificationData
Click to show internal directories.
Click to hide internal directories.