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

Switch to DEV API for tests

parent a2c35b39
Branches
No related tags found
No related merge requests found
Pipeline #5585 passed
......@@ -45,7 +45,12 @@ func main() {
redirectUri := "https://oauth-proxy.wf.alpha.grandlyon.com/redirect"
responseType := "code"
redirectUrl := "https://mon-compte-particulier.enedis.fr/dataconnect/v1/oauth2/authorize?client_id="+ clientId +"&duration=P6M&redirect_uri="+ redirectUri +"&response_type="+ responseType +"&state="+ state +"-"+ cozyOrigin
// DEV API
authURL := "https://gw.hml.api.enedis.fr/dataconnect/v1/oauth2/authorize"
// PROD API
//authURL := "https://mon-compte-particulier.enedis.fr/dataconnect/v1/oauth2/authorize"
redirectUrl := authURL +"?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"), "- Redirect to - ", redirectUrl)
http.Redirect(w, r, redirectUrl, 302)
......@@ -155,7 +160,10 @@ func main() {
fmt.Printf("grant_type: %s\n", grantType)
fmt.Printf("refresh_token: %s\n", refreshToken)
tokenUrl := "https://gw.prd.api.enedis.fr/v1/oauth2/token"
// DEV API
tokenUrl := "https://gw.hml.api.enedis.fr/v1/oauth2/token"
// PROD API
// tokenUrl := "https://gw.prd.api.enedis.fr/v1/oauth2/token"
data := url.Values{}
data.Set("client_id", clientId)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment