summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/config/Config.java
diff options
context:
space:
mode:
Diffstat (limited to 'dozentenmodul/src/main/java/config/Config.java')
-rw-r--r--dozentenmodul/src/main/java/config/Config.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/dozentenmodul/src/main/java/config/Config.java b/dozentenmodul/src/main/java/config/Config.java
index e6686a60..97ede10d 100644
--- a/dozentenmodul/src/main/java/config/Config.java
+++ b/dozentenmodul/src/main/java/config/Config.java
@@ -171,6 +171,15 @@ public class Config {
public static int getIdP() {
return Integer.parseInt(getString("main", "IdP", ""));
}
+ /**
+ * Query the authentication method of the configuration file
+ * @return stored IdP
+ */
+ public static String getAuthenticationMethod() {
+ return getString("main", "authMethod", "");
+ }
+
+
/**
* Sets the value of 'BillOfRights' in the configuration file to 'value'
@@ -221,6 +230,13 @@ public class Config {
public static boolean setIdP(String value) {
return setString("main", "IdP", value);
}
+ /**
+ * Sets the value of the selected authentication method in the configuration file to 'value'
+ * @return true if it succeeded, false otherwise
+ */
+ public static boolean setAuthenticationMethod(String value) {
+ return setString("main","authMethod", value);
+ }
/**
* Save the changes to the ini file to actual file on the disk.
@@ -295,4 +311,6 @@ public class Config {
private static boolean setString(String section, String key, String value) {
return ini.put(section, key, value) != null;
}
+
+
}