verifymyage

package module
v0.0.0-...-0940abd Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

README

verifymyage-go

Documentation

Index

Constants

View Source
const (
	UNITED_KINGDOM                 = "gb"
	UNITED_KINGDOM_TWO             = "gb2"
	FRANCE                         = "fr"
	GERMANY                        = "de"
	GERMANY_TWO                    = "de2"
	UNITED_STATES_OF_AMERICA       = "us"
	UNITED_STATES_OF_AMERICA_TWO   = "us2"
	UNITED_STATES_OF_AMERICA_THREE = "us3"
	UNITED_STATES_OF_AMERICA_FOUR  = "us4"
	UNITED_STATES_OF_AMERICA_FIVE  = "us5"
	DEMO                           = "demo"
)

Country constants

View Source
const (
	AGE_ESTIMATION     = "AgeEstimation"
	CREDIT_CARD        = "CreditCard"
	ID_SCAN            = "IDScan"
	ID_SCAN_FACE_MATCH = "IDScanFaceMatch"
	EMAIL              = "Email"
)

Method constants

Variables

This section is empty.

Functions

This section is empty.

Types

type Countries

type Countries struct{}

Countries defines constants for supported countries

type Methods

type Methods struct{}

Methods defines constants for verification methods

type OAuth

type OAuth struct {
	Scope string
	// contains filtered or unexported fields
}

OAuth struct to hold OAuth specific details

func NewOAuth

func NewOAuth(clientID, clientSecret, redirectURL, scope string) *OAuth

NewOAuth creates a new OAuth instance

func (*OAuth) ExchangeCodeByToken

func (o *OAuth) ExchangeCodeByToken(ctx context.Context, code string) (*oauth2.Token, error)

ExchangeCodeByToken exchanges the provided code for an access token

func (*OAuth) RedirectURL

func (o *OAuth) RedirectURL(country, method string) (string, error)

RedirectURL generates the URL to redirect the user for authorization

func (*OAuth) UseSandbox

func (o *OAuth) UseSandbox()

UseSandbox configures the provider to use the sandbox environment

func (*OAuth) User

func (o *OAuth) User(ctx context.Context, token *oauth2.Token) (map[string]interface{}, error)

User retrieves the real user details using the access token

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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