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

Method SetConfig

auth/oidc.go:125–136  ·  view source on GitHub ↗

SetConfig sets the ID Token verifier and token endpoint URLs on OIDCClient

(verifier *oidc.IDTokenVerifier, endpoint oauth2.Endpoint)

Source from the content-addressed store, hash-verified

123
124// SetConfig sets the ID Token verifier and token endpoint URLs on OIDCClient
125func (client *OIDCClient) SetConfig(verifier *oidc.IDTokenVerifier, endpoint oauth2.Endpoint) {
126 client.mutex.Lock()
127 client.verifier = verifier
128 client.config = &oauth2.Config{
129 ClientID: client.config.ClientID,
130 ClientSecret: client.config.ClientSecret,
131 Endpoint: endpoint,
132 RedirectURL: client.config.RedirectURL,
133 Scopes: client.config.Scopes,
134 }
135 client.mutex.Unlock()
136}
137
138type OIDCProvider struct {
139 JWTConfigCommon

Callers 3

initOIDCClientMethod · 0.80
runDiscoverySyncMethod · 0.80
TestConcurrentSetConfigFunction · 0.80

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by 1

TestConcurrentSetConfigFunction · 0.64