Merge branch 'private_cas'
authorAlex Kirhenshtein <alk@netxms.org>
Wed, 10 Jul 2013 11:18:01 +0000 (11:18 +0000)
committerAlex Kirhenshtein <alk@netxms.org>
Wed, 10 Jul 2013 11:18:01 +0000 (11:18 +0000)
Conflicts:
src/java/netxms-client-api/src/main/java/org/netxms/api/client/reporting/ReportingServerManager.java

include/nxclapi.h
src/java/netxms-client-api/src/main/java/org/netxms/api/client/constants/ScheduleType.java [new file with mode: 0644]
src/java/netxms-client-api/src/main/java/org/netxms/api/client/reporting/ReportingServerManager.java
src/java/netxms-client/src/main/java/org/netxms/client/NXCSession.java
src/server/core/Makefile.am
src/server/core/session.cpp
webui/webapp/Core/.classpath
webui/webapp/Core/src/org/netxms/webui/core/ApplicationWorkbenchWindowAdvisor.java

index 6678859..bd9d12c 100644 (file)
@@ -111,6 +111,7 @@ typedef void * NXC_SESSION;
  */
 #define NETXMS_AUTH_TYPE_PASSWORD       0
 #define NETXMS_AUTH_TYPE_CERTIFICATE    1
+#define NETXMS_AUTH_TYPE_TOKEN          2
 
 /**
  * Client type
diff --git a/src/java/netxms-client-api/src/main/java/org/netxms/api/client/constants/ScheduleType.java b/src/java/netxms-client-api/src/main/java/org/netxms/api/client/constants/ScheduleType.java
new file mode 100644 (file)
index 0000000..f6d8446
--- /dev/null
@@ -0,0 +1,18 @@
+package org.netxms.api.client.constants;
+
+public enum ScheduleType
+{
+       Once(0), Daily(1), Weekly(2), Monthly(3);
+
+       private final int code;
+
+       ScheduleType(int code)
+       {
+               this.code = code;
+       }
+
+       public int getCode()
+       {
+               return code;
+       }
+}
index 8144dfe..9dad6db 100644 (file)
@@ -7,6 +7,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 import org.netxms.api.client.NetXMSClientException;
+import org.netxms.api.client.constants.ScheduleType;
 
 public interface ReportingServerManager
 {
index ae75df0..229042b 100644 (file)
@@ -175,6 +175,7 @@ public class NXCSession implements Session, ScriptLibraryManager, UserManager, S
        // Authentication types\r
        public static final int AUTH_TYPE_PASSWORD = 0;\r
        public static final int AUTH_TYPE_CERTIFICATE = 1;\r
+       public static final int AUTH_TYPE_TOKEN = 2;\r
 \r
        // Notification channels\r
        public static final int CHANNEL_EVENTS = 0x0001;\r
index 387c9ba..0ec976f 100644 (file)
@@ -27,7 +27,7 @@ libnxcore_la_SOURCES =  accesspoint.cpp acl.cpp actions.cpp admin.cpp \
                        syslogd.cpp template.cpp tools.cpp tracert.cpp \
                        uniroot.cpp upload_job.cpp uptimecalc.cpp userdb.cpp \
                        userdb_objects.cpp vpnconn.cpp vrrp.cpp watchdog.cpp \
-                       winperf.cpp zone.cpp reporting.cpp
+                       winperf.cpp zone.cpp reporting.cpp cas_validator.cpp
 libnxcore_la_CPPFLAGS=-I@top_srcdir@/include -I@top_srcdir@/src/server/include
 libnxcore_la_LDFLAGS = -version-info $(NETXMS_LIBRARY_VERSION)
 libnxcore_la_LIBADD = \
index 2c9f355..dac8319 100644 (file)
@@ -1683,6 +1683,11 @@ void ClientSession::login(CSCPMessage *pRequest)
                                dwResult = RCC_NOT_IMPLEMENTED;
 #endif
                                break;
+         case NETXMS_AUTH_TYPE_TOKEN:
+            TCHAR token[1024];
+                               pRequest->GetVariableStr(VID_TOKEN, token, 1024);
+                               dwResult = AuthenticateUser(szLogin, szPassword, 0, NULL, NULL, &m_dwUserId,
+                                                                                                        &m_dwSystemAccess, &changePasswd, &intruderLockout);
                        default:
                                dwResult = RCC_UNSUPPORTED_AUTH_TYPE;
                                break;
index 5483ddc..3028495 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
        <classpathentry exported="true" kind="lib" path="jar/netxms-base-1.2.8.jar"/>
-       <classpathentry exported="true" kind="lib" path="jar/netxms-client-1.2.8.jar" sourcepath="/netxms-client"/>
+       <classpathentry exported="true" kind="lib" path="jar/netxms-client-1.2.8.jar" sourcepath="/Users/alk/Development/netxms/src/java/netxms-client"/>
        <classpathentry exported="true" kind="lib" path="jar/netxms-client-api-1.2.8.jar"/>
        <classpathentry exported="true" kind="lib" path="jar/simple-xml-2.6.4.jar"/>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
index b02281a..b90a402 100644 (file)
@@ -165,6 +165,11 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor
                boolean success = false;
                
                readAppProperties();
+               
+               String ssoTicket = RWT.getRequest().getParameter("ticket");
+               if (ssoTicket != null) {
+                       // login using ticket
+               }
 
                String password = "";
                boolean autoLogin = (RWT.getRequest().getParameter("auto") != null); //$NON-NLS-1$