Author: ruschein
Date: 2011-09-20 15:02:53 -0700 (Tue, 20 Sep 2011)
New Revision: 26892

Added:
   csplugins/trunk/ucsd/ruschein/GSFS/progs/GSAuth.cc
Modified:
   csplugins/trunk/ucsd/ruschein/GSFS/progs/Makefile
Log:
Work in progress.

Added: csplugins/trunk/ucsd/ruschein/GSFS/progs/GSAuth.cc
===================================================================
--- csplugins/trunk/ucsd/ruschein/GSFS/progs/GSAuth.cc                          
(rev 0)
+++ csplugins/trunk/ucsd/ruschein/GSFS/progs/GSAuth.cc  2011-09-20 22:02:53 UTC 
(rev 26892)
@@ -0,0 +1,27 @@
+#include <iostream>
+#include <string>
+#include <IniFile.h>
+#include <MiscUtil.h>
+#include <StringUtil.h>
+
+
+int main(int /*argc*/, char */*argv*/[]) {
+       try {
+               const IniFile iniFile(MiscUtil::GetEnv("HOME") + 
"/etc/GenomeSpace.ini");
+               const std::string host = iniFile.getString("", 
"gsIdentityServer");
+               const std::string username = iniFile.getString("", 
"gsUsername");
+               const std::string password = iniFile.getString("", 
"gsPassword");
+               const std::string protocol = iniFile.getString("", 
"gsProtocol");
+               const unsigned port = iniFile.getUnsigned("", "gsPort");
+               const std::string context = iniFile.getString("", "gsContext");
+
+               const std::string loginUrl = protocol + "://" + username + ":" 
+ password + "@" + host
+                                            + ":" + StringUtil::ToString(port) 
+ "/" + context + "/auth";
+
+               const std::string logoutUrl = protocol + "://" + host + ":" + 
StringUtil::ToString(port) + "/" + context + "/logout";
+
+               std::cout << "loginUrl = " << loginUrl << '\n';
+       } catch (const std::exception &x) {
+               std::cerr << "** Caught exception: " << x.what() << '\n';
+       }
+}

Modified: csplugins/trunk/ucsd/ruschein/GSFS/progs/Makefile
===================================================================
--- csplugins/trunk/ucsd/ruschein/GSFS/progs/Makefile   2011-09-20 21:27:15 UTC 
(rev 26891)
+++ csplugins/trunk/ucsd/ruschein/GSFS/progs/Makefile   2011-09-20 22:02:53 UTC 
(rev 26892)
@@ -1,12 +1,22 @@
 CXX         = g++-mp-4.4
 CXXFLAGS    = -W -Wall -Werror -I../include
+LIBS        = -lcurl -lpcre -lssl -lcrypto -L/opt/local/lib -lmagic -lz -L 
../lib -liViaCoreSubset
+PROGS       = FetchPage GSAuth
 
 
+all: $(PROGS)
+
 FetchPage: FetchPage.o
-       $(CXX) -o $@ $^ -lcurl -lpcre -lssl -lcrypto -L/opt/local/lib -lmagic 
-lz -L ../lib -liViaCoreSubset
+       $(CXX) -o $@ $^ $(LIBS)
 
 FetchPage.o: FetchPage.cc
        $(CXX) $(CXXFLAGS) -c $<
 
+GSAuth: GSAuth.o
+       $(CXX) -o $@ $^ $(LIBS)
+
+GSAuth.o: GSAuth.cc
+       $(CXX) $(CXXFLAGS) -c $<
+
 clean:
-       rm -f *.o *~
+       rm -f *.o *~ $(PROGS)

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to