worldcoin

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotLikelyHuman = errors.New("not likely human")
)

Functions

This section is empty.

Types

type HumanityInfo

type HumanityInfo struct {
	LikelyHuman    string `json:"likely_human"`
	CredentialType string `json:"credential_type"`
}

type UserInfo

type UserInfo struct {
	Sub          string       `json:"sub"`
	HumanityInfo HumanityInfo `json:"https://id.worldcoin.org/beta"`
	Email        string       `json:"email,omitempty"`
	Name         string       `json:"name,omitempty"`
	GivenName    string       `json:"given_name,omitempty"`
	FamilyName   string       `json:"family_name,omitempty"`
}

UserInfo is data that is returned by Worldcoin by /userinfo endpoint.

type VerificationData

type VerificationData resources.WorldcoinData

VerificationData is data that is required by Worldcoin to verify a user

func (VerificationData) Validate

func (v VerificationData) Validate() error

type Worldcoin

type Worldcoin struct {
	*req.Client
}

Worldcoin is a struct that implements the identityproviders.IdentityProvider interface

func NewIdentityProvider

func NewIdentityProvider(log *logan.Entry, settings *config.WorldcoinSettings) *Worldcoin

NewIdentityProvider returns a new Worldcoin struct

func (*Worldcoin) Verify

func (w *Worldcoin) Verify(
	user *data.User, verifyDataRaw []byte,
) (*issuer.IdentityProvidersCredentialSubject, []byte, error)

Verify verifies the user's identity

Jump to

Keyboard shortcuts

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