verifier_yandex

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ClientID     string
	ClientSecret string
	RedirectURL  string
	Scopes       []string
}

type UserInfo

type UserInfo struct {
	Login             string   `json:"login"`
	ID                string   `json:"id"`
	ClientId          string   `json:"client_id"`
	OpenidIdentities  []string `json:"openid_identities"`
	OldSocialLogin    string   `json:"old_social_login"`
	DefaultEmail      string   `json:"default_email"`
	Emails            []string `json:"emails"`
	IsAvatarEmpty     bool     `json:"is_avatar_empty"`
	DefaultAvatarId   string   `json:"default_avatar_id"`
	Birthday          string   `json:"birthday"`
	FirstName         string   `json:"first_name"`
	LastName          string   `json:"last_name"`
	DisplayName       string   `json:"display_name"`
	ReposURL          string   `json:"repos_url"`
	EventsURL         string   `json:"events_url"`
	ReceivedEventsURL string   `json:"received_events_url"`
	RealName          string   `json:"real_name"`
	Sex               string   `json:"sex"`
}

type Verifier

type Verifier struct {
	// contains filtered or unexported fields
}

func New

func New(cfg Config) *Verifier

func (*Verifier) GetOAuth2Identity

func (prov *Verifier) GetOAuth2Identity(ctx context.Context, accessToken string) (iden *identity.IdentityData, verifierData *identity.VerifierData, err error)

func (*Verifier) GetOAuth2URL

func (prov *Verifier) GetOAuth2URL(state string) string

func (*Verifier) HandleOAuth2Callback

func (prov *Verifier) HandleOAuth2Callback(ctx context.Context, code string) (token *oauth2.Token, err error)

func (*Verifier) Info

func (prov *Verifier) Info() identity.VerifierInfo

func (*Verifier) NormalizeIdentity

func (prov *Verifier) NormalizeIdentity(idn string) string

Jump to

Keyboard shortcuts

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