skip escaping

This commit is contained in:
Aliaksandr Pliutau 2015-11-17 10:31:13 +07:00
parent 2f016eafbb
commit 01a9cc8bc9
2 changed files with 5 additions and 2 deletions

View File

@ -21,8 +21,8 @@ func (c *Client) GetAuthorizationCodeURL(redirectURI string, scopes []string) (s
} }
return strings.Replace(c.APIBase, "api.", "", -1) + "/webapps/auth/protocol/openidconnect/v1/authorize?client_id=" + return strings.Replace(c.APIBase, "api.", "", -1) + "/webapps/auth/protocol/openidconnect/v1/authorize?client_id=" +
url.QueryEscape(c.ClientID) + "&response_type=code&scope=" + strings.Join(scopes, "+") + c.ClientID + "&response_type=code&scope=" + strings.Join(scopes, "+") +
"&redirect_uri=" + url.QueryEscape(redirectURI), nil "&redirect_uri=" + redirectURI, nil
} }
// GetAccessToken returns struct of TokenResponse // GetAccessToken returns struct of TokenResponse

View File

@ -15,4 +15,7 @@ func main() {
fmt.Println("ERROR: " + err.Error()) fmt.Println("ERROR: " + err.Error())
os.Exit(1) os.Exit(1)
} }
url, err := client.GetAuthorizationCodeURL("http://test.com", []string{})
fmt.Println("DEBUG: AuthCodeURL=" + url)
} }