MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / OIDCProvider

Struct OIDCProvider

auth/oidc.go:138–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138type OIDCProvider struct {
139 JWTConfigCommon
140 ValidationKey *string `json:"validation_key,omitempty"` // Client secret
141 CallbackURL *string `json:"callback_url,omitempty"` // Sync Gateway redirect URL. Needs to be specified to handle load balancer endpoints? Or can we lazy load on first client use, based on request
142 Scope []string `json:"scope,omitempty"` // Scope sent for openid request
143 IncludeAccessToken bool `json:"include_access,omitempty"` // Whether the _oidc_callback response should include OP access token and associated fields (token_type, expires_in)
144 DiscoveryURI string `json:"discovery_url,omitempty"` // Non-standard discovery endpoints
145 DisableConfigValidation bool `json:"disable_cfg_validation,omitempty"` // Bypasses config validation based on the OIDC spec. Required for some OPs that don't strictly adhere to spec (eg. Yahoo)
146
147 // DisableCallbackState determines whether or not to maintain state between the "/_oidc" and
148 // "/_oidc_callback" endpoints. The default value of DisableCallbackState is false, which means
149 // state is maintained between auth request and the callback. It can be disabled through provider
150 // configuration by setting property "disable_callback_state": true. Disabling callback state is
151 // vulnerable to Cross-Site Request Forgery (CSRF, XSRF) and NOT recommended.
152 DisableCallbackState bool `json:"disable_callback_state,omitempty"`
153
154 // AllowUnsignedProviderTokens allows users to opt-in to accepting unsigned tokens from providers.
155 AllowUnsignedProviderTokens bool `json:"allow_unsigned_provider_tokens"`
156
157 // client represents client configurations to authenticate end-users
158 // with an OpenID Connect provider. It must not be accessed directly,
159 // use the accessor method GetClient() instead.
160 client *OIDCClient
161
162 // clientInitLock synchronises access to the GetClient() and ensures that
163 // the OpenID Connect client only gets initialized exactly once when
164 // the client has been successfully initialized.
165 clientInitLock sync.Mutex
166
167 // clientInit tracks whether the client has been successfully initialized or not
168 clientInit base.AtomicBool
169
170 // IsDefault indicates whether this OpenID Connect provider (the current
171 // instance of OIDCProvider is explicitly specified as default provider
172 // in providers configuration.
173 IsDefault bool
174
175 // Name represents the name of this OpenID Connect provider.
176 Name string
177
178 // terminator ensures termination of async goroutines for provider
179 // metadata sync. Closed during DatabaseContext.close().
180 terminator chan struct{}
181
182 // metadata describes the configuration of an OpenID Connect Provider.
183 metadata ProviderMetadata
184
185 // InsecureSkipVerify determines whether the TLS certificate verification
186 // should be disabled for this provider. TLS certificate verification is
187 // enabled by default.
188 InsecureSkipVerify bool
189}
190
191type OIDCProviderMap map[string]*OIDCProvider
192

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected