summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/process
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/c2kernel/process')
-rw-r--r--src/main/java/com/c2kernel/process/Gateway.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/main/java/com/c2kernel/process/Gateway.java b/src/main/java/com/c2kernel/process/Gateway.java
index 70bfb14..2bbe638 100644
--- a/src/main/java/com/c2kernel/process/Gateway.java
+++ b/src/main/java/com/c2kernel/process/Gateway.java
@@ -57,6 +57,7 @@ public class Gateway
static private EntityProxyManager mProxyManager;
static private CorbaServer mCorbaServer;
static private CastorXMLUtility mMarshaller;
+ static private AgentProxy mCurrentUser = null;
//static private SimpleTCPIPServer mHTTPServer;
@@ -206,8 +207,8 @@ public class Gateway
}
else
{
- Logger.error("LDAP not configured properly.");
- throw new InvalidDataException("Cannot authenticate. Name and/or password invalid.", "");
+ Logger.error("LDAP properties not set for server login.");
+ throw new InvalidDataException("Cannot authenticate with LDAP.", "");
}
setup();
@@ -278,7 +279,8 @@ public class Gateway
if (agentPath!=null)
{
setup();
- return (AgentProxy) mProxyManager.getProxy(agentPath);
+ mCurrentUser = (AgentProxy) mProxyManager.getProxy(agentPath);
+ return mCurrentUser;
}
else
{
@@ -301,6 +303,13 @@ public class Gateway
}
/**
+ * @return the mCurrentUser
+ */
+ public static AgentProxy getCurrentUser() {
+ return mCurrentUser;
+ }
+
+ /**
* Initializes the storage and proxy manager, called during connect.
*
* @throws InvalidDataException