Package de.narimo.geocore.ws.auth.tools
Class AuthenticationTools
- java.lang.Object
-
- de.narimo.geocore.ws.auth.tools.AuthenticationTools
-
public class AuthenticationTools extends Object
- Author:
- Ulrich
-
-
Constructor Summary
Constructors Constructor Description AuthenticationTools()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringcreateSession(String userName, String userPass)Authenticates a user and returns the created sessionId.static booleandestroySession(String sessionId, boolean remove)Logs out a user from the current session.static de.narimo.commons.UserCredentialsgetAndRenewLoggedInUser(String sessionid)Looks up a session id in the session store and updates the session expires timestamp.static voidmain(String[] args)
-
-
-
Method Detail
-
createSession
public static String createSession(String userName, String userPass) throws Exception
Authenticates a user and returns the created sessionId.- Parameters:
userName-userPass-- Returns:
- Throws:
Exception
-
destroySession
public static boolean destroySession(String sessionId, boolean remove) throws Exception
Logs out a user from the current session. This will either update the expires timestamp from table session_store or remove it completely.- Parameters:
sessionId-remove-- Returns:
- Throws:
Exception
-
getAndRenewLoggedInUser
public static de.narimo.commons.UserCredentials getAndRenewLoggedInUser(String sessionid) throws Exception
Looks up a session id in the session store and updates the session expires timestamp.- Parameters:
sessionid-- Returns:
- Throws:
Exception
-
-