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

Function ExtractOAuth2ProviderAppWithOAuth2Errors

coderd/httpmw/oauth2.go:248–250  ·  view source on GitHub ↗

ExtractOAuth2ProviderAppWithOAuth2Errors is the same as ExtractOAuth2ProviderApp but returns OAuth2-compliant errors instead of generic API errors. This should be used for OAuth2 endpoints like /oauth2/tokens.

(db database.Store)

Source from the content-addressed store, hash-verified

246// returns OAuth2-compliant errors instead of generic API errors. This should be used
247// for OAuth2 endpoints like /oauth2/tokens.
248func ExtractOAuth2ProviderAppWithOAuth2Errors(db database.Store) func(http.Handler) http.Handler {
249 return extractOAuth2ProviderAppBase(db, &oauth2ErrorWriter{})
250}
251
252// errorWriter interface abstracts different error response formats.
253// This uses the Strategy pattern to avoid a control flag (useOAuth2Errors bool)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected