openid

package
v0.0.0-...-1dc2712 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2025 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProviderDetails

func GetProviderDetails(providerName string) (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"`
}

type Config

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

type IDToken

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

func GetIDToken

func GetIDToken(providerName, authCode, redirectURI, codeVerifier string) (idToken IDToken, err 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