config

package
v0.0.0-...-7dca2e3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthMethod

type AuthMethod string
const (
	AuthMethodPrivateKeyJWT AuthMethod = "private_key_jwt"
	AuthMethodClientSecret  AuthMethod = "client_secret"
)

type Client

type Client interface {
	ACRValues() string
	Audiences() map[string]bool
	AuthMethod() AuthMethod
	ClientID() string
	ClientJWK() jwk.Key
	ClientSecret() string
	PostLogoutRedirectURI() string
	ResourceIndicator() string
	Scopes() scopes.Scopes
	UILocales() string
	WellKnownURL() string
}

func NewClientConfig

func NewClientConfig(cfg *config.Config) (Client, error)

type Config

type Config interface {
	Client() Client
	Provider() Provider
}

func NewConfig

func NewConfig(cfg *wonderwallconfig.Config) (Config, error)

type Provider

type Provider interface {
	AuthorizationEndpoint() string
	EndSessionEndpointURL() url.URL
	IDTokenSigningAlg() jwa.KeyAlgorithm
	Issuer() string
	JwksURI() string
	TokenEndpoint() string

	ACRValuesSupported() Supported
	UILocalesSupported() Supported

	SessionStateRequired() bool
	SidClaimRequired() bool
}

func NewProviderConfig

func NewProviderConfig(cfg *config.Config) (Provider, error)

type ProviderMetadata

type ProviderMetadata struct {
	Issuer                                 string    `json:"issuer"`
	AuthorizationEndpoint                  string    `json:"authorization_endpoint"`
	PushedAuthorizationRequestEndpoint     string    `json:"pushed_authorization_request_endpoint"`
	TokenEndpoint                          string    `json:"token_endpoint"`
	EndSessionEndpoint                     string    `json:"end_session_endpoint"`
	RevocationEndpoint                     string    `json:"revocation_endpoint"`
	JwksURI                                string    `json:"jwks_uri"`
	ResponseTypesSupported                 []string  `json:"response_types_supported"`
	ResponseModesSupported                 []string  `json:"response_modes_supported"`
	SubjectTypesSupported                  []string  `json:"subject_types_supported"`
	IDTokenSigningAlgValuesSupported       []string  `json:"id_token_signing_alg_values_supported"`
	CodeChallengeMethodsSupported          []string  `json:"code_challenge_methods_supported"`
	UserInfoEndpoint                       string    `json:"userinfo_endpoint"`
	ScopesSupported                        []string  `json:"scopes_supported"`
	UILocalesSupported                     Supported `json:"ui_locales_supported"`
	ACRValuesSupported                     Supported `json:"acr_values_supported"`
	FrontchannelLogoutSupported            bool      `json:"frontchannel_logout_supported"`
	FrontchannelLogoutSessionSupported     bool      `json:"frontchannel_logout_session_supported"`
	IntrospectionEndpoint                  string    `json:"introspection_endpoint"`
	TokenEndpointAuthMethodsSupported      []string  `json:"token_endpoint_auth_methods_supported"`
	RequestParameterSupported              bool      `json:"request_parameter_supported"`
	RequestURIParameterSupported           bool      `json:"request_uri_parameter_supported"`
	RequestObjectSigningAlgValuesSupported []string  `json:"request_object_signing_alg_values_supported"`
	CheckSessionIframe                     string    `json:"check_session_iframe"`
}

func (*ProviderMetadata) Print

func (c *ProviderMetadata) Print()

func (*ProviderMetadata) Validate

func (c *ProviderMetadata) Validate(cfg config.OpenID) error

type Supported

type Supported []string

func (Supported) Contains

func (in Supported) Contains(value string) bool

Jump to

Keyboard shortcuts

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