errorFromChallenges returns the error from the given "WWW-Authenticate" header challenges. It only looks at challenges with the "Bearer" scheme.
(cs []oauthex.Challenge)
| 310 | // errorFromChallenges returns the error from the given "WWW-Authenticate" header challenges. |
| 311 | // It only looks at challenges with the "Bearer" scheme. |
| 312 | func errorFromChallenges(cs []oauthex.Challenge) string { |
| 313 | for _, c := range cs { |
| 314 | if c.Scheme == "bearer" && c.Params["error"] != "" { |
| 315 | return c.Params["error"] |
| 316 | } |
| 317 | } |
| 318 | return "" |
| 319 | } |
| 320 | |
| 321 | // getProtectedResourceMetadata returns the protected resource metadata. |
| 322 | // If no metadata was found or the fetched metadata fails security checks, |
no outgoing calls
no test coverage detected
searching dependent graphs…