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

Function OAuth2ProviderAppSecret

coderd/httpmw/oauth2.go:372–378  ·  view source on GitHub ↗

OAuth2ProviderAppSecret returns the OAuth2 app secret from the ExtractOAuth2ProviderAppSecretParam handler.

(r *http.Request)

Source from the content-addressed store, hash-verified

370// OAuth2ProviderAppSecret returns the OAuth2 app secret from the
371// ExtractOAuth2ProviderAppSecretParam handler.
372func OAuth2ProviderAppSecret(r *http.Request) database.OAuth2ProviderAppSecret {
373 app, ok := r.Context().Value(oauth2ProviderAppSecretParamContextKey{}).(database.OAuth2ProviderAppSecret)
374 if !ok {
375 panic("developer error: oauth2 app secret param middleware not provided")
376 }
377 return app
378}
379
380// ExtractOAuth2ProviderAppSecret grabs an OAuth2 app secret from the "app" and
381// "secret" URL parameters. This middleware requires the ExtractOAuth2ProviderApp

Callers 1

DeleteAppSecretFunction · 0.92

Calls 2

ContextMethod · 0.65
ValueMethod · 0.45

Tested by

no test coverage detected