diff options
author | Nino Breuer | 2015-05-26 17:01:04 +0200 |
---|---|---|
committer | Nino Breuer | 2015-05-26 17:01:04 +0200 |
commit | c0dcb858ab7f75d563b16039c8d06250e376346c (patch) | |
tree | 83000d5f7a6fb314013c95a0596457ec56dbbfcb /dozentenmodul/src/main/java/config/Config.java | |
parent | • removed "wrong" and unsafe param; is now taken by UserInfo-Object from token (diff) | |
download | tutor-module-c0dcb858ab7f75d563b16039c8d06250e376346c.tar.gz tutor-module-c0dcb858ab7f75d563b16039c8d06250e376346c.tar.xz tutor-module-c0dcb858ab7f75d563b16039c8d06250e376346c.zip |
• logintype (test, bwidm) wird mitgespeichert und beim start mitgeladen. nicht schön aber selten, via stringvergleich
Diffstat (limited to 'dozentenmodul/src/main/java/config/Config.java')
-rw-r--r-- | dozentenmodul/src/main/java/config/Config.java | 18 |
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; } + + } |