diff options
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java')
-rw-r--r-- | id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java | 69 |
1 files changed, 1 insertions, 68 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java index 4f901fcc8..cafafddb7 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java @@ -7,7 +7,6 @@ import java.util.List; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; import at.gv.egovernment.moa.id.auth.builder.LoginFormBuilder; import at.gv.egovernment.moa.id.auth.builder.SendAssertionFormBuilder; @@ -16,15 +15,12 @@ import at.gv.egovernment.moa.id.auth.data.AuthenticationSession; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; import at.gv.egovernment.moa.id.auth.exception.BuildException; import at.gv.egovernment.moa.id.auth.exception.MOAIDException; -import at.gv.egovernment.moa.id.auth.exception.WrongParametersException; import at.gv.egovernment.moa.id.auth.parser.StartAuthentificationParameterParser; import at.gv.egovernment.moa.id.auth.servlet.AuthServlet; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; -import at.gv.egovernment.moa.id.config.OAParameter; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.storage.AuthenticationSessionStoreage; -import at.gv.egovernment.moa.id.util.HTTPSessionUtils; import at.gv.egovernment.moa.id.util.ParamValidatorUtils; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.StringUtils; @@ -48,61 +44,6 @@ public class AuthenticationManager extends AuthServlet { } -// public AuthenticationSession getAuthenticationSession( -// HttpSession session) { -// String sessionID = HTTPSessionUtils.getHTTPSessionString(session, -// MOA_SESSION, null); -// if (sessionID != null) { -// try { -// return AuthenticationSessionStoreage.getSession(sessionID); -// -// } catch (MOADatabaseException e) { -// return null; -// } -// } -// return null; -// } - -// /** -// * Checks if the session is authenticated -// * -// * @param request -// * @param response -// * @return -// */ -// public boolean isAuthenticated(HttpServletRequest request, -// HttpServletResponse response) { -// Logger.info("Checking authentication"); -// -// HttpSession session = request.getSession(); -// -// String moaSessionID = HTTPSessionUtils.getHTTPSessionString(session, MOA_SESSION, null); -// -// if(moaSessionID == null) { -// Logger.info("NO MOA Session to logout"); -// return false; -// } -// -//// AuthenticationSession authSession; -//// try { -//// authSession = AuthenticationSessionStoreage -//// .getSession(moaSessionID); -//// -//// } catch (MOADatabaseException e) { -//// Logger.info("NO MOA Authentication data for ID " + moaSessionID); -//// return false; -//// } -//// -//// if(authSession == null) { -//// Logger.info("NO MOA Authentication data for ID " + moaSessionID); -//// return false; -//// } -//// -//// return authSession.isAuthenticated(); -// -// return AuthenticationSessionStoreage.isAuthenticated(moaSessionID); -// } - /** * Checks if this request can authenticate a MOA Session * @@ -112,9 +53,7 @@ public class AuthenticationManager extends AuthServlet { */ public boolean tryPerformAuthentication(HttpServletRequest request, HttpServletResponse response) { - - HttpSession session = request.getSession(); - + String sessionID = (String) request.getParameter(PARAM_SESSIONID); if (sessionID != null) { Logger.info("got MOASession: " + sessionID); @@ -134,8 +73,6 @@ public class AuthenticationManager extends AuthServlet { AuthenticationSessionStoreage.storeSession(authSession); -// HTTPSessionUtils.setHTTPSessionString(session, MOA_SESSION, -// sessionID); return true; // got authenticated } } @@ -153,10 +90,6 @@ public class AuthenticationManager extends AuthServlet { HttpServletResponse response, String moaSessionID) { Logger.info("Logout"); - HttpSession session = request.getSession(); - - //String moaSessionID = HTTPSessionUtils.getHTTPSessionString(session, MOA_SESSION, null); - if(moaSessionID == null) { moaSessionID = (String) request.getParameter(PARAM_SESSIONID); } |