diff --git a/main.go b/main.go index 99449aea9b7123a644c82ee86213e831a5b50846..b27b4cd0062d2ad6feaa752c546ccafeac4e2667 100644 --- a/main.go +++ b/main.go @@ -267,7 +267,7 @@ func main() { redirectUrl := authURL + "?client_id=" + clientId + "&scope=openid&response_type=code&redirect_uri=" + redirectProxy + "&login_hint=Prénom|Nom||Ecolyo&state=" + state + "-" + instanceName - log.Info("WL - GrdfSuccess - Authorize - Redirect user to: ", redirectUrl) + log.Info("WL - GrdfSuccess - Authorize - Redirect user") http.Redirect(w, r, redirectUrl, 302) } else { logRoute("Proxy_error_grdf_auth") @@ -319,7 +319,7 @@ func main() { usagePointId := query.Get("usage_point_id") cozyURL := "https://" + host + "." + *cozyDomain + *cozyRedirectURI redir := cozyURL + "?code=" + code + "&state=" + state + "&usage_point_id=" + usagePointId - log.Info("WL - EnedisSuccess - Redirect - Redirecting user to Cozy stack: ", redir) + log.Info("WL - EnedisSuccess - Redirect - Redirecting user to Cozy stack") http.Redirect(w, r, redir, 302) } else { logRoute("Proxy_error_enedis_redirect") @@ -359,7 +359,7 @@ func main() { cozyURL := "https://" + host + "." + *cozyDomain + *cozyGrdfRedirectURI redir := cozyURL + "?code=" + code + "&state=" + state - log.Info("WL - GrdfSuccess - Redirect - Redirect to Cozy stack: ", redir) + log.Info("WL - GrdfSuccess - Redirect - Redirect to Cozy stack") http.Redirect(w, r, redir, 302) } else { logRoute("Proxy_error_grdf_redirect") @@ -422,13 +422,13 @@ func main() { refreshToken = query.Get("refresh_token") } // Print out the result - log.WithFields(log.Fields{ - "client_id": clientId, - "client_secret": clientSecret, - "code": code, - "grant_type": grantType, - "refresh_token": refreshToken, - }).Debug("WL - EnedisInfo - Token - Result") + // log.WithFields(log.Fields{ + // "client_id": clientId, + // "client_secret": clientSecret, + // "code": code, + // "grant_type": grantType, + // "refresh_token": refreshToken, + // }).Debug("WL - EnedisInfo - Token - Result") // DEV API // tokenUrl := "https://gw.hml.api.enedis.fr/v1/oauth2/token" @@ -544,14 +544,14 @@ func main() { } // Print out the result - log.WithFields(log.Fields{ - "client_id": clientId, - "client_secret": clientSecret, - "code": code, - "grant_type": grantType, - "redirect_uri": redirectUri, - "scope": scope, - }).Debug("WL - GrdfInfo - Token - Result") + // log.WithFields(log.Fields{ + // "client_id": clientId, + // "client_secret": clientSecret, + // "code": code, + // "grant_type": grantType, + // "redirect_uri": redirectUri, + // "scope": scope, + // }).Debug("WL - GrdfInfo - Token - Result") tokenUrl := "https://sofit-sso-oidc.grdf.fr/openam/oauth2/realms/externeGrdf/access_token"