Help us shape the future of Go! Take the 2026 Go Developer Survey

oidc

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: LGPL-2.1 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NuntioOAuth2 = "https://oauth2.nuntio.io/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Google

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

func (*Google) RedirectUrl

func (g *Google) RedirectUrl(redirectUrl string, provider *go_nuntio.OidcProvider) (string, error)

func (*Google) Validate

func (g *Google) Validate(ctx context.Context, oidcProvider *go_nuntio.OidcProvider, code, redirectUrl string) (*go_nuntio.User, error)

type GoogleUserClaim

type GoogleUserClaim struct {
	Id        string `json:"sub"`
	Email     string `json:"email"`
	Name      string `json:"name"`
	Image     string `json:"picture"`
	FirstName string `json:"given_name"`
	LastName  string `json:"family_name"`
	Verified  bool   `json:"email_verified"`
}

type Nuntio

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

func (*Nuntio) RedirectUrl

func (n *Nuntio) RedirectUrl(redirectUrl string, provider *go_nuntio.OidcProvider) (string, error)

func (*Nuntio) Validate

func (n *Nuntio) Validate(ctx context.Context, oidcProvider *go_nuntio.OidcProvider, code, redirectUrl string) (*go_nuntio.User, error)

type NuntioUserClaim

type NuntioUserClaim struct {
	Id        string    `json:"id"`
	Email     string    `json:"email"`
	FirstName string    `json:"first_name"`
	LastName  string    `json:"last_name"`
	Gender    int32     `json:"gender"`
	Birthday  time.Time `json:"birthday"`
	Address   string    `json:"address"`
	City      string    `json:"city"`
	ZipCode   string    `json:"zip_code"`
	Country   string    `json:"country"`
	SsnHash   string    `json:"ssn"`
}

type Provider

type Provider interface {
	Validate(ctx context.Context, provider *go_nuntio.OidcProvider, code, redirectUrl string) (*go_nuntio.User, error)
	RedirectUrl(redirectUrl string, provider *go_nuntio.OidcProvider) (string, error)
}

type Providers

type Providers interface {
	Get(provider go_nuntio.OidcProviderType) (Provider, error)
}

func New

func New(ctx context.Context, logger *zap.Logger) (Providers, error)

Jump to

Keyboard shortcuts

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