Skip to content
Snippets Groups Projects
Commit 4b2752cc authored by Yoan VALLET's avatar Yoan VALLET
Browse files

Remove redirect_uri from Authorize

parent 6f29872c
No related branches found
No related tags found
No related merge requests found
Pipeline #5858 passed
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment