openid

package
v0.0.0-...-6983768 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClientDetails

func GetClientDetails(providerName string) (string, string, error)

func GetProviderName

func GetProviderName(providerName string) (string, error)

func Init

func Init(cfg Config, l zerolog.Logger) error

Types

type ClientConfig

type ClientConfig struct {
	ID                    string `koanf:"id"`
	Name                  string `koanf:"name"`
	IssuerURL             string `koanf:"issuer_url"`
	ClientID              string `koanf:"client_id"`
	ClientSecret          string `koanf:"client_secret"`
	AllowUnverifiedEmails bool   `koanf:"allow_unverified_emails"`
}

type Config

type Config struct {
	Clients []ClientConfig `koanf:"clients"`
}

type IDToken

type IDToken struct {
	Email         string `json:"email"`
	EmailVerified bool   `json:"email_verified"`
	Name          string `json:"name"`
	GivenName     string `json:"given_name"`
	FamilyName    string `json:"family_name"`
}

func GetIDToken

func GetIDToken(providerName, authCode, redirectURI, codeVerifier string) (IDToken, error)

type Provider

type Provider struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

func Providers

func Providers() []Provider

type ProviderConfig

type ProviderConfig struct {
	AuthorizationEndpoint string `json:"authorization_endpoint"`
	TokenEndpoint         string `json:"token_endpoint"`
}

Jump to

Keyboard shortcuts

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