(r *http.Request)
| 13 | type externalAuthParamContextKey struct{} |
| 14 | |
| 15 | func ExternalAuthParam(r *http.Request) *externalauth.Config { |
| 16 | config, ok := r.Context().Value(externalAuthParamContextKey{}).(*externalauth.Config) |
| 17 | if !ok { |
| 18 | panic("developer error: external auth param middleware not provided") |
| 19 | } |
| 20 | return config |
| 21 | } |
| 22 | |
| 23 | func ExtractExternalAuthParam(configs []*externalauth.Config) func(next http.Handler) http.Handler { |
| 24 | configByID := make(map[string]*externalauth.Config) |