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

Function WithStaticUserInfo

coderd/coderdtest/oidctest/idp.go:336–342  ·  view source on GitHub ↗

WithStaticUserInfo is optional, but will return the same user info for every user on the /userinfo endpoint.

(info jwt.MapClaims)

Source from the content-addressed store, hash-verified

334// WithStaticUserInfo is optional, but will return the same user info for
335// every user on the /userinfo endpoint.
336func WithStaticUserInfo(info jwt.MapClaims) func(*FakeIDP) {
337 return func(f *FakeIDP) {
338 f.hookUserInfo = func(_ string) (jwt.MapClaims, error) {
339 return info, nil
340 }
341 }
342}
343
344func WithRevokeTokenRFC(revokeFunc HookRevokeTokenFn) func(*FakeIDP) {
345 return func(f *FakeIDP) {

Callers 3

TestUserOIDCFunction · 0.92
RunIDPFunction · 0.92
setupOIDCTestFunction · 0.92

Calls

no outgoing calls

Tested by 2

TestUserOIDCFunction · 0.74
setupOIDCTestFunction · 0.74