diff options
author | Parménides GV <parmegv@sdf.org> | 2013-05-01 19:01:16 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2013-05-01 19:01:16 +0200 |
commit | a16605fd16a87faa5fa530288e01f0d7c7c7bf98 (patch) | |
tree | 0df31a8e69062ffbbc1e119c13c6e4fabdb172f9 /src/se/leap/leapclient | |
parent | ff3d469a9549e3670e097fc0e49c043c84e7b7d4 (diff) |
Logging in successfully to dev.bitmask.net :)
The problem was that I needed to append the api_version to the api_uri.
I was doing well in tests because I hardcoded the api urls, but in
production code I was getting from provider.json only api_url and not
api_version.
Diffstat (limited to 'src/se/leap/leapclient')
-rw-r--r-- | src/se/leap/leapclient/ConfigHelper.java | 1 | ||||
-rw-r--r-- | src/se/leap/leapclient/Dashboard.java | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/se/leap/leapclient/ConfigHelper.java b/src/se/leap/leapclient/ConfigHelper.java index 76845228..72d966b8 100644 --- a/src/se/leap/leapclient/ConfigHelper.java +++ b/src/se/leap/leapclient/ConfigHelper.java @@ -37,6 +37,7 @@ public class ConfigHelper { final public static String srpAuth = "srpAuth"; public static String logIn = "logIn"; public static String logOut = "logOut"; + public static String api_version_key = "api_version"; final public static String resultKey = "result"; final static String provider_key = "provider"; final static String cert_key = "cert"; diff --git a/src/se/leap/leapclient/Dashboard.java b/src/se/leap/leapclient/Dashboard.java index a68c048b..67e33e77 100644 --- a/src/se/leap/leapclient/Dashboard.java +++ b/src/se/leap/leapclient/Dashboard.java @@ -170,7 +170,7 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf JSONObject provider_json; try { provider_json = new JSONObject(preferences.getString(ConfigHelper.provider_key, "")); - method_and_parameters.putString(ConfigHelper.api_url_key, provider_json.getString(ConfigHelper.api_url_key)); + method_and_parameters.putString(ConfigHelper.api_url_key, provider_json.getString(ConfigHelper.api_url_key) + "/" + provider_json.getString(ConfigHelper.api_version_key)); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); |