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

Struct DBTokenProvider

coderd/workspaceapps/db.go:36–50  ·  view source on GitHub ↗

DBTokenProvider provides authentication and authorization for workspace apps by querying the database if the request is missing a valid token.

Source from the content-addressed store, hash-verified

34// DBTokenProvider provides authentication and authorization for workspace apps
35// by querying the database if the request is missing a valid token.
36type DBTokenProvider struct {
37 Logger slog.Logger
38 ctx context.Context
39
40 // DashboardURL is the main dashboard access URL for error pages.
41 DashboardURL *url.URL
42 Authorizer rbac.Authorizer
43 ConnectionLogger *atomic.Pointer[connectionlog.ConnectionLogger]
44 Database database.Store
45 DeploymentValues *codersdk.DeploymentValues
46 OAuth2Configs *httpmw.OAuth2Configs
47 WorkspaceAgentInactiveTimeout time.Duration
48 WorkspaceAppAuditSessionTimeout time.Duration
49 Keycache cryptokeys.SigningKeycache
50}
51
52var _ SignedTokenProvider = &DBTokenProvider{}
53

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected