Allow configuration overriding with environment variables
This commit is contained in:
@ -4,6 +4,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
oidc "forge.cadoles.com/wpetit/goweb-oidc"
|
||||
"forge.cadoles.com/wpetit/goweb-oidc/internal/config"
|
||||
"github.com/pkg/errors"
|
||||
"gitlab.com/wpetit/goweb/middleware/container"
|
||||
"gitlab.com/wpetit/goweb/service/session"
|
||||
@ -11,6 +12,7 @@ import (
|
||||
|
||||
func handleLogout(w http.ResponseWriter, r *http.Request) {
|
||||
ctn := container.Must(r.Context())
|
||||
conf := config.Must(ctn)
|
||||
|
||||
sess, err := session.Must(ctn).Get(w, r)
|
||||
if err != nil {
|
||||
@ -23,5 +25,5 @@ func handleLogout(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
client := oidc.Must(ctn)
|
||||
|
||||
client.Logout(w, r, "")
|
||||
client.Logout(w, r, conf.OIDC.PostLogoutRedirectURL)
|
||||
}
|
||||
|
Reference in New Issue
Block a user