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

Function newOIDCMCPTokenSource

coderd/mcp.go:48–57  ·  view source on GitHub ↗

newOIDCMCPTokenSource returns nil when no OIDC provider is configured. mcpclient treats a nil source the same as "no token available" and omits the Authorization header.

(db database.Store, config promoauth.OAuth2Config, logger slog.Logger)

Source from the content-addressed store, hash-verified

46// configured. mcpclient treats a nil source the same as "no token
47// available" and omits the Authorization header.
48func newOIDCMCPTokenSource(db database.Store, config promoauth.OAuth2Config, logger slog.Logger) mcpclient.UserOIDCTokenSource {
49 if config == nil {
50 return nil
51 }
52 return &oidcMCPTokenSource{
53 db: db,
54 config: config,
55 logger: logger,
56 }
57}
58
59// OIDCAccessToken implements mcpclient.UserOIDCTokenSource. It
60// refreshes expired tokens and persists the refreshed token back

Callers 2

NewFunction · 0.85
TestOIDCMCPTokenSourceFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestOIDCMCPTokenSourceFunction · 0.68