config

package
v0.0.0-...-73eb7b8 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 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 {
	ACRValuesSupported() Supported
	AuthorizationEndpoint() string
	AuthorizationResponseIssParameterSupported() bool
	EndSessionEndpointURL() url.URL
	IDTokenSigningAlg() jwa.KeyAlgorithm
	Issuer() string
	JwksURI() string
	PushedAuthorizationRequestEndpoint() string
	SessionStateRequired() bool
	SidClaimRequired() bool
	TokenEndpoint() string
	UILocalesSupported() Supported
}

func NewProviderConfig

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

type ProviderMetadata

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

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