14 lines
290 B
Go
14 lines
290 B
Go
|
package auth
|
||
|
|
||
|
import "net/http"
|
||
|
|
||
|
func (h *AuthHandler) Disconnect(w http.ResponseWriter, r *http.Request) {
|
||
|
session, err := h.idp.SessionsStore.Get(r, "parcoursmob_session")
|
||
|
if err == nil {
|
||
|
session.Options.MaxAge = -1
|
||
|
session.Save(r, w)
|
||
|
}
|
||
|
|
||
|
http.Redirect(w, r, "/", http.StatusOK)
|
||
|
}
|