Compare commits
2 Commits
d5c846a9ce
...
26a9ad0e2e
Author | SHA1 | Date |
---|---|---|
wpetit | 26a9ad0e2e | |
wpetit | 3e5dd446cb |
|
@ -2,6 +2,7 @@ package oidc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -74,7 +75,7 @@ func (c *Client) login(w http.ResponseWriter, r *http.Request, sess *sessions.Se
|
||||||
|
|
||||||
sess.Values[sessionKeyLoginState] = state
|
sess.Values[sessionKeyLoginState] = state
|
||||||
sess.Values[sessionKeyLoginNonce] = nonce
|
sess.Values[sessionKeyLoginNonce] = nonce
|
||||||
sess.Values[sessionKeyPostLoginRedirectURL] = originalURL.String()
|
sess.Values[sessionKeyPostLoginRedirectURL] = fmt.Sprintf("%s?%s", originalURL.Path, originalURL.Query().Encode())
|
||||||
|
|
||||||
if err := sess.Save(r, w); err != nil {
|
if err := sess.Save(r, w); err != nil {
|
||||||
logger.Error(ctx, "could not save session", logger.E(errors.WithStack(err)))
|
logger.Error(ctx, "could not save session", logger.E(errors.WithStack(err)))
|
||||||
|
|
|
@ -49,9 +49,9 @@ func fromStoreOptions(storeOptions store.LayerOptions, baseURL string) (*LayerOp
|
||||||
LayerOptions: authn.DefaultLayerOptions(),
|
LayerOptions: authn.DefaultLayerOptions(),
|
||||||
OIDC: OIDCOptions{
|
OIDC: OIDCOptions{
|
||||||
LoginCallbackURL: baseURL + loginCallbackPath,
|
LoginCallbackURL: baseURL + loginCallbackPath,
|
||||||
MatchLoginCallbackURL: "*" + loginCallbackPath,
|
MatchLoginCallbackURL: "*" + loginCallbackPath + "*",
|
||||||
LogoutURL: baseURL + logoutPath,
|
LogoutURL: baseURL + logoutPath,
|
||||||
MatchLogoutURL: "*" + logoutPath,
|
MatchLogoutURL: "*" + logoutPath + "*",
|
||||||
Scopes: []string{"openid"},
|
Scopes: []string{"openid"},
|
||||||
},
|
},
|
||||||
Cookie: CookieOptions{
|
Cookie: CookieOptions{
|
||||||
|
|
Loading…
Reference in New Issue