Commit 5b6440c4 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

847: Implement development / debugging flag

Task-Url: https://minfba.de.dariah.eu/mantisbt/view.php?id=847
parent 09cd130d
...@@ -57,6 +57,8 @@ public class LocalAuthenticationProvider implements DebugAwareAuthenticationProv ...@@ -57,6 +57,8 @@ public class LocalAuthenticationProvider implements DebugAwareAuthenticationProv
public Authentication getAuthentication() { public Authentication getAuthentication() {
if (authDebug!=null && (System.getProperty("saml")==null || !Boolean.parseBoolean(System.getProperty("saml")))) { if (authDebug!=null && (System.getProperty("saml")==null || !Boolean.parseBoolean(System.getProperty("saml")))) {
SecurityContextHolder.getContext().setAuthentication(authDebug); SecurityContextHolder.getContext().setAuthentication(authDebug);
// This allows for a global logout of the test user
this.authDebug = null;
} }
return SecurityContextHolder.getContext().getAuthentication(); return SecurityContextHolder.getContext().getAuthentication();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment