From 4b2752cc4335bc0a42601f533dfc0d5d70f595c0 Mon Sep 17 00:00:00 2001 From: Yoan VALLET <ext.sopra.yvallet@grandlyon.com> Date: Wed, 10 Jun 2020 17:22:28 +0200 Subject: [PATCH] Remove redirect_uri from Authorize --- main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.go b/main.go index 1dbb514..1b20574 100644 --- a/main.go +++ b/main.go @@ -17,7 +17,6 @@ import ( var ( httpPort = flag.Int("http_port", LookupEnvOrInt("HTTP_PORT", 80), "HTTP port to serve on (defaults to 80)") logLevel = flag.String("loglevel", LookupEnvOrString("LOGLEVEL", "debug"), "log level (debug, info, warning, error) (defaults to debug)") - proxyRedirectURI = flag.String("proxy_redirect_uri", LookupEnvOrString("PROXY_REDIRECT_URI", "https://oauth-proxy.wf.alpha.grandlyon.com/redirect"), "Proxy redirect URI (defaults to https://oauth-proxy.wf.alpha.grandlyon.com/redirect)") cozyDomain = flag.String("cozy_domain", LookupEnvOrString("COZY_DOMAIN", "cozy.wf.alpha.grandlyon.com"), "Cozy domain (defaults to cozy.wf.alpha.grandlyon.com)") cozyRedirectURI = flag.String("cozy_redirect_uri", LookupEnvOrString("COZY_REDIRECT_URI", "/accounts/enedis/redirect"), "Cozy redirect URI (defaults to /accounts/enedis/redirect)") ) @@ -115,7 +114,7 @@ func main() { // PROD API authURL := "https://mon-compte-particulier.enedis.fr/dataconnect/v1/oauth2/authorize" - redirectUrl := authURL + "?client_id=" + clientId + "&duration=P6M&redirect_uri=" + *proxyRedirectURI + "&response_type=" + responseType + "&state=" + state + "-" + instanceName + redirectUrl := authURL + "?client_id=" + clientId + "&duration=P6M&response_type=" + responseType + "&state=" + state + "-" + instanceName log.Debug("Redirect to - ", redirectUrl) http.Redirect(w, r, redirectUrl, 302) -- GitLab