mirror of
https://github.com/nais/wonderwall.git
synced 2026-05-09 09:56:48 +00:00
17 lines
500 B
Go
17 lines
500 B
Go
package handler
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
logentry "github.com/nais/wonderwall/pkg/middleware"
|
|
)
|
|
|
|
// LogoutCallback handles the callback from the self-initiated logout for the current user
|
|
func (h *Handler) LogoutCallback(w http.ResponseWriter, r *http.Request) {
|
|
redirect := h.Client.LogoutCallback(r).PostLogoutRedirectURI()
|
|
|
|
logger := logentry.LogEntry(r.Context())
|
|
logger.Info().Msgf("logout/callback: redirecting to %s", redirect)
|
|
http.Redirect(w, r, redirect, http.StatusTemporaryRedirect)
|
|
}
|