authenticate: support for per-route client id and client secret (#3030)

* implement dynamic provider support

* authenticate: support per-route client id and secret
This commit is contained in:
Caleb Doxsey 2022-02-16 12:31:55 -07:00 committed by GitHub
parent 99ffaf233d
commit f9b95a276b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 557 additions and 183 deletions

View file

@ -27,7 +27,11 @@ func NewError(status int, err error) error {
// Error implements the `error` interface.
func (e *HTTPError) Error() string {
return StatusText(e.Status) + ": " + e.Err.Error()
str := StatusText(e.Status)
if e.Err != nil {
str += ": " + e.Err.Error()
}
return str
}
// Unwrap implements the `error` Unwrap interface.