From b43be33e21a3098d163f0fa7d871d38ac54e0738 Mon Sep 17 00:00:00 2001
From: Yoan VALLET <ext.sopra.yvallet@grandlyon.com>
Date: Tue, 26 May 2020 18:01:58 +0200
Subject: [PATCH] Change URL to production

---
 main.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/main.go b/main.go
index e68eb06..638b476 100644
--- a/main.go
+++ b/main.go
@@ -45,7 +45,7 @@ func main() {
 		redirectUri := "https://oauth-proxy.wf.alpha.grandlyon.com/redirect"
 		responseType := "code" 
 
-		authReq := "https://gw.hml.api.enedis.fr/dataconnect/v1/oauth2/authorize?client_id="+ clientId +"&duration=P6M&redirect_uri="+ redirectUri +"&response_type="+ responseType +"&state="+ state +"-"+ cozyOrigin
+		authReq := "https://mon-compte-particulier.enedis.fr/dataconnect/v1/oauth2/authorize?client_id="+ clientId +"&duration=P6M&redirect_uri="+ redirectUri +"&response_type="+ responseType +"&state="+ state +"-"+ cozyOrigin
 
 		fmt.Println(time.Now().Format("2006-01-02 15:04:05"), "- Send request to auth endpoint", authReq)
 		response, err := http.Get(authReq)
@@ -180,7 +180,7 @@ func main() {
 		fmt.Printf("grant_type: %s\n", grantType)
 		fmt.Printf("refresh_token: %s\n", refreshToken)
 		
-		tokenUrl := "https://gw.hml.api.enedis.fr/v1/oauth2/token"
+		tokenUrl := "https://gw.prd.api.enedis.fr/v1/oauth2/token"
 		
 		data := url.Values{}
 		data.Set("client_id", clientId)
-- 
GitLab