chore(deps): update oidc to 1.2.0 (#3363)

* chore(deps): update oidc to 1.2.0

* add comment
This commit is contained in:
Livio Amstutz
2022-04-05 09:22:00 +02:00
committed by GitHub
parent c740ee5d81
commit b949b8fc65
6 changed files with 10 additions and 9 deletions

View File

@@ -36,7 +36,7 @@ type Login struct {
authRepo auth_repository.Repository
baseURL string
consolePath string
oidcAuthCallbackURL string
oidcAuthCallbackURL func(string) string
idpConfigAlg crypto.EncryptionAlgorithm
userCodeAlg crypto.EncryptionAlgorithm
iamDomain string
@@ -63,8 +63,8 @@ func CreateLogin(config Config,
systemDefaults systemdefaults.SystemDefaults,
consolePath,
domain,
baseURL,
oidcAuthCallbackURL string,
baseURL string,
oidcAuthCallbackURL func(string) string,
externalSecure bool,
userAgentCookie,
instanceHandler mux.MiddlewareFunc,

View File

@@ -43,12 +43,11 @@ func (l *Login) renderSuccessAndCallback(w http.ResponseWriter, r *http.Request,
userData: l.getUserData(r, authReq, "Login Successful", errID, errMessage),
}
if authReq != nil {
data.RedirectURI = l.oidcAuthCallbackURL
data.RedirectURI = l.oidcAuthCallbackURL("") //the id will be set via the html (maybe change this with the login refactoring)
}
l.renderer.RenderTemplate(w, r, l.getTranslator(authReq), l.renderer.Templates[tmplLoginSuccess], data, nil)
}
func (l *Login) redirectToCallback(w http.ResponseWriter, r *http.Request, authReq *domain.AuthRequest) {
callback := l.oidcAuthCallbackURL + authReq.ID
http.Redirect(w, r, callback, http.StatusFound)
http.Redirect(w, r, l.oidcAuthCallbackURL(authReq.ID), http.StatusFound)
}