OAuth2ProviderApp returns the OAuth2 app from the ExtractOAuth2ProviderAppParam handler.
(r *http.Request)
| 228 | |
| 229 | // OAuth2ProviderApp returns the OAuth2 app from the ExtractOAuth2ProviderAppParam handler. |
| 230 | func OAuth2ProviderApp(r *http.Request) database.OAuth2ProviderApp { |
| 231 | app, ok := r.Context().Value(oauth2ProviderAppParamContextKey{}).(database.OAuth2ProviderApp) |
| 232 | if !ok { |
| 233 | panic("developer error: oauth2 app param middleware not provided") |
| 234 | } |
| 235 | return app |
| 236 | } |
| 237 | |
| 238 | // ExtractOAuth2ProviderApp grabs an OAuth2 app from the "app" URL parameter. This |
| 239 | // middleware requires the API key middleware higher in the call stack for |
no test coverage detected