mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-10-19 04:47:48 +00:00
Even more tests, crossed 50% coverage
This commit is contained in:
@@ -181,8 +181,7 @@ func (t *TraefikOidc) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
|
||||
|
||||
if req.URL.Path == t.logoutURLPath {
|
||||
t.handleLogout(rw, req)
|
||||
http.Error(rw, "Logged out", http.StatusForbidden)
|
||||
return
|
||||
return // Remove the http.Error call here
|
||||
}
|
||||
|
||||
if t.redirectURL == "" {
|
||||
@@ -300,11 +299,14 @@ func (t *TraefikOidc) buildAuthURL(redirectURL, state, nonce string) string {
|
||||
"client_id": {t.clientID},
|
||||
"response_type": {"code"},
|
||||
"redirect_uri": {redirectURL},
|
||||
"scope": {strings.Join(t.scopes, " ")},
|
||||
"state": {state},
|
||||
"nonce": {nonce},
|
||||
}
|
||||
|
||||
if len(t.scopes) > 0 {
|
||||
params.Set("scope", strings.Join(t.scopes, " "))
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%s?%s", t.authURL, params.Encode())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user