From c0dcb858ab7f75d563b16039c8d06250e376346c Mon Sep 17 00:00:00 2001 From: Nino Breuer Date: Tue, 26 May 2015 17:01:04 +0200 Subject: • logintype (test, bwidm) wird mitgespeichert und beim start mitgeladen. nicht schön aber selten, via stringvergleich --- dozentenmodul/src/main/java/config/Config.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'dozentenmodul/src/main/java/config/Config.java') 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; } + + } -- cgit v1.2.3-55-g7522