Skip to content
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.

Revocation url #254

Merged
merged 2 commits into from
Jul 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ FIXES:
* fixed a number of linting errors highlighted by gometalinter [#PR209](https://github.com/gambol99/keycloak-proxy/pull/209)
* added docker image instructions to the readme [#PR204](https://github.com/gambol99/keycloak-proxy/pull/204)
* added unit tests for the debug handlers [#PR223](https://github.com/gambol99/keycloak-proxy/pull/223)
* fixing the logout handler panic when revocation url is not set [#PR254](https://github.com/gambol99/keycloak-proxy/pull/254)

FEATURES
* changed the routing engine from gin to echo
Expand Down
8 changes: 7 additions & 1 deletion handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,13 @@ func (r *oauthProxy) logoutHandler(w http.ResponseWriter, req *http.Request) {
}()
}

revocationURL := defaultTo(r.config.RevocationEndpoint, r.idp.EndSessionEndpoint.String())
// set the default revocation url
revokeDefault := ""
if r.idp.EndSessionEndpoint != nil {
revokeDefault = r.idp.EndSessionEndpoint.String()
}
revocationURL := defaultTo(r.config.RevocationEndpoint, revokeDefault)

// step: do we have a revocation endpoint?
if revocationURL != "" {
client, err := r.client.OAuthClient()
Expand Down