MCPcopy Index your code
hub / github.com/coder/coder / updateIssuerURL

Method updateIssuerURL

coderd/coderdtest/oidctest/idp.go:517–540  ·  view source on GitHub ↗
(t testing.TB, issuer string)

Source from the content-addressed store, hash-verified

515}
516
517func (f *FakeIDP) updateIssuerURL(t testing.TB, issuer string) {
518 t.Helper()
519
520 u, err := url.Parse(issuer)
521 require.NoError(t, err, "invalid issuer URL")
522
523 f.locked.SetIssuer(issuer)
524 f.locked.SetIssuerURL(u)
525 // ProviderJSON is the JSON representation of the OpenID Connect provider
526 // These are all the urls that the IDP will respond to.
527 f.locked.SetProvider(ProviderJSON{
528 Issuer: issuer,
529 AuthURL: u.ResolveReference(&url.URL{Path: authorizePath}).String(),
530 TokenURL: u.ResolveReference(&url.URL{Path: tokenPath}).String(),
531 JWKSURL: u.ResolveReference(&url.URL{Path: keysPath}).String(),
532 UserInfoURL: u.ResolveReference(&url.URL{Path: userInfoPath}).String(),
533 RevokeURL: u.ResolveReference(&url.URL{Path: revokeTokenPath}).String(),
534 DeviceCodeURL: u.ResolveReference(&url.URL{Path: deviceAuth}).String(),
535 Algorithms: []string{
536 "RS256",
537 },
538 ExternalAuthURL: u.ResolveReference(&url.URL{Path: "/external-auth-validate/user"}).String(),
539 })
540}
541
542// realServer turns the FakeIDP into a real http server.
543func (f *FakeIDP) realServer(t testing.TB) *httptest.Server {

Callers 3

NewFakeIDPFunction · 0.95
realServerMethod · 0.95
ExternalAuthConfigMethod · 0.95

Calls 6

SetIssuerMethod · 0.80
SetIssuerURLMethod · 0.80
SetProviderMethod · 0.80
HelperMethod · 0.65
ParseMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected