Documentation
¶
Index ¶
- Variables
- func BindFlags(vip *viper.Viper, flags *pflag.FlagSet)
- func GetDCByDN(dn string) (string, error)
- func MappingClaims(attrs map[string][]string, maps map[string]ClaimConfig) map[string]interface{}
- func TakeOptions(prefix string, typ reflect.Type, result map[string]string)
- type ClaimConfig
- type ClientConfig
- type Config
- func (c *Config) AsYAML() (string, error)
- func (c *Config) EndpointPaths() ResolvedEndpointPaths
- func (c *Config) Load(file string, flags *pflag.FlagSet) error
- func (c *Config) OpenIDConfiguration() OpenIDConfiguration
- func (c *Config) ReadReader(config io.Reader) error
- func (c *Config) Validate() error
- type Duration
- type EndpointConfig
- type EnvReplacer
- type ExpireConfig
- type LDAPConfig
- type MetricsConfig
- type OpenIDConfiguration
- type ParseErrorSet
- type Pattern
- type PatternSet
- type ResolvedEndpointPaths
- type ScopeConfig
- type TCPAddr
- type TLSConfig
- type TemplateConfig
- type URL
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultScopes = ScopeConfig{ "profile": []ClaimConfig{ {Claim: "name", Attribute: "displayName", Type: "string"}, {Claim: "given_name", Attribute: "givenName", Type: "string"}, {Claim: "family_name", Attribute: "sn", Type: "string"}, }, "email": []ClaimConfig{ {Claim: "email", Attribute: "mail", Type: "string"}, }, "phone": []ClaimConfig{ {Claim: "phone_number", Attribute: "telephoneNumber", Type: "string"}, }, "groups": []ClaimConfig{ {Claim: "groups", Attribute: "memberOf", Type: "[]string"}, }, } )
Functions ¶
func MappingClaims ¶
func MappingClaims(attrs map[string][]string, maps map[string]ClaimConfig) map[string]interface{}
Types ¶
type ClaimConfig ¶
type ClientConfig ¶
type ClientConfig map[string]struct { Secret string `yaml:"secret"` RedirectURI PatternSet `yaml:"redirect_uri"` }
type Config ¶
type Config struct {
Issuer *URL `yaml:"issuer" flag:"issuer"`
Listen *TCPAddr `yaml:"listen,omitempty" flag:"listen"`
SignKey string `yaml:"sign_key,omitempty" flag:"sign-key"`
TLS TLSConfig `yaml:"tls,omitempty"`
LDAP LDAPConfig `yaml:"ldap"`
Expire ExpireConfig `yaml:"expire"`
Endpoints EndpointConfig `yaml:"endpoint"`
Scopes ScopeConfig `yaml:"scope,omitempty"`
Clients ClientConfig `yaml:"client,omitempty"`
Metrics MetricsConfig `yaml:"metrics"`
Templates TemplateConfig `yaml:"template,omitempty"`
DisableClientAuth bool `yaml:"disable_client_auth" flag:"disable-client-auth"`
AllowImplicitFlow bool `yaml:"allow_implicit_flow" flag:"allow-implicit-flow"`
}
func (*Config) EndpointPaths ¶
func (c *Config) EndpointPaths() ResolvedEndpointPaths
func (*Config) OpenIDConfiguration ¶
func (c *Config) OpenIDConfiguration() OpenIDConfiguration
type Duration ¶
func NewDuration ¶
func ParseDuration ¶
func (Duration) IntSeconds ¶
func (Duration) MarshalText ¶
func (Duration) StrSeconds ¶
func (*Duration) UnmarshalText ¶
type EndpointConfig ¶
type EnvReplacer ¶
type EnvReplacer struct{}
func (EnvReplacer) Replace ¶
func (r EnvReplacer) Replace(s string) string
type ExpireConfig ¶
type LDAPConfig ¶
type LDAPConfig struct {
Server *URL `yaml:"server" flag:"ldap"`
User string `yaml:"user" flag:"ldap-user"`
Password string `yaml:"password" flag:"ldap-password"`
BaseDN string `yaml:"base_dn" flag:"ldap-base-dn"`
IDAttribute string `yaml:"id_attribute" flag:"ldap-id-attribute"`
DisableTLS bool `yaml:"disable_tls" flag:"ldap-disable-tls"`
}
type MetricsConfig ¶
type OpenIDConfiguration ¶
type OpenIDConfiguration struct {
Issuer string `json:"issuer"`
AuthorizationEndpoint string `json:"authorization_endpoint"`
TokenEndpoint string `json:"token_endpoint"`
UserinfoEndpoint string `json:"userinfo_endpoint"`
JwksEndpoint string `json:"jwks_uri"`
EndSessionEndpoint string `json:"end_session_endpoint"`
ScopesSupported []string `json:"scopes_supported"`
ResponseTypesSupported []string `json:"response_types_supported"`
ResponseModesSupported []string `json:"response_modes_supported"`
GrantTypesSupported []string `json:"grant_types_supported"`
SubjectTypesSupported []string `json:"subject_types_supported"`
IDTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported"`
TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported"`
DisplayValuesSupported []string `json:"display_values_supported"`
ClaimsSupported []string `json:"claims_supported"`
RequestURIParameterSupported bool `json:"request_uri_parameter_supported"`
}
type ParseErrorSet ¶
type ParseErrorSet []error
func (ParseErrorSet) Error ¶
func (es ParseErrorSet) Error() string
type Pattern ¶
type Pattern struct {
// contains filtered or unexported fields
}
func (Pattern) MarshalText ¶
func (*Pattern) UnmarshalText ¶
type PatternSet ¶
type PatternSet []Pattern
func (PatternSet) Match ¶
func (ps PatternSet) Match(url string) bool
type ResolvedEndpointPaths ¶
type ScopeConfig ¶
type ScopeConfig map[string][]ClaimConfig
func (ScopeConfig) AllClaims ¶
func (sc ScopeConfig) AllClaims() []string
func (ScopeConfig) AttributesFor ¶
func (sc ScopeConfig) AttributesFor(scopes []string) []string
func (ScopeConfig) ClaimMapFor ¶
func (sc ScopeConfig) ClaimMapFor(scopes []string) map[string]ClaimConfig
func (ScopeConfig) ScopeNames ¶
func (sc ScopeConfig) ScopeNames() []string
type TCPAddr ¶
func DecideListenAddress ¶
func (*TCPAddr) MarshalText ¶
func (*TCPAddr) UnmarshalText ¶
type TemplateConfig ¶
Click to show internal directories.
Click to hide internal directories.