summaryrefslogtreecommitdiff
path: root/src/se/leap/leapclient/ProviderListContent.java
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2013-05-09 17:29:38 +0200
committerParménides GV <parmegv@sdf.org>2013-05-09 17:29:38 +0200
commit84a11bb1620d2b9080992427c847b58007f2304a (patch)
treeaa6522b67def74ff8627d1cc73a33fcd17f7efdb /src/se/leap/leapclient/ProviderListContent.java
parentfb5e26c2ff4f95dd826a3ce3545865ac4388b711 (diff)
Log in and Log out options are shown only if allow registration is true.
Allow registration is present in provider.json. Provider.json is downloaded from both preseeded and custom providers. Authentication success or fail is notified correctly to the user.
Diffstat (limited to 'src/se/leap/leapclient/ProviderListContent.java')
-rw-r--r--src/se/leap/leapclient/ProviderListContent.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/se/leap/leapclient/ProviderListContent.java b/src/se/leap/leapclient/ProviderListContent.java
index 8cc349c2..d4bb6a9a 100644
--- a/src/se/leap/leapclient/ProviderListContent.java
+++ b/src/se/leap/leapclient/ProviderListContent.java
@@ -78,8 +78,10 @@ public class ProviderListContent {
}
}
- public ProviderItem(String name, String provider_json_url, FileInputStream provider_json, boolean custom, boolean danger_on) {
+ public ProviderItem(String name, String provider_json_url, String provider_json_filename, boolean custom, boolean danger_on) {
+
+ FileInputStream provider_json = ConfigHelper.openFileInputStream(provider_json_filename);
try {
byte[] urls_file_bytes = new byte[provider_json.available()];
provider_json.read(urls_file_bytes);
@@ -88,6 +90,7 @@ public class ProviderListContent {
id = name;
this.name = name;
this.provider_json_url = provider_json_url;
+ this.provider_json_filename = provider_json_filename;
eip_service_json_url = file_contents.getString("api_uri") + "/" + file_contents.getString("api_version") + "/" + ConfigHelper.eip_service_api_path;
cert_json_url = (String) file_contents.get("ca_cert_uri");
this.custom = custom;