Page 4 of 4 FirstFirst ... 234
Results 31 to 34 of 34

Thread: Extending authentication

  1. #31
    Join Date
    Oct 2007
    Posts
    37
    Rep Power
    8

    Default

    Hi Jgao,

    I am new to pre-auth. I want to know where we put the jsp URL and how to insert into our Third-Party web page...?

    Also we are giving only one username in the file. If another user login to third-party application and click the link means, privacy is broken know,, So please give me basic and detailed guidline to use pre-auth for me.

    I look at the Wiki page, but i get more confused like, where to use the URL and how to apply to all users, etc...

    So please clear me......

    Expecting your reply..

    Thanks!...

  2. #32
    Join Date
    Nov 2007
    Posts
    1
    Rep Power
    7

    Default Cant get authToken

    Hello Everyone,
    For some reason, I cant seem to get the auth Token from /service/soap. (I get a java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:7070/service/soap)
    I can get all the other JSON responses from the server normally. When I login as user1 into Zimbra(in debug mode), I can see the auth token in the Zimbra SOAP Request/Response window. So it's only through my code that auth_token isn't being returned.
    Could there be something wrong with my LDAP ?

    Thanks,
    -Linux/Java newbie


    My Code... (Which Doesn't work)

    Code:
    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <%@ page  language="java" %>
    <%@ page  import="java.io.*" %>
    <%@ page  import="java.net.*" %>
    
    String GetAuthTokenSOAPString = "<soap:Envelope xmlns:soap='http://www.w3.org/2003/05/soap-envelope'>";
    	 GetAuthTokenSOAPString = "<soap:Header>";
    	 GetAuthTokenSOAPString = "<context xmlns='urn:zimbra'>";
    	 GetAuthTokenSOAPString = "<format type='js'/>";
    	 GetAuthTokenSOAPString = "</context>";
    	 GetAuthTokenSOAPString = "</soap:Header>";
    	 GetAuthTokenSOAPString = "<soap:Body>";
    	 GetAuthTokenSOAPString = "<AuthRequest xmlns='urn:zimbraAccount'>";
    	 GetAuthTokenSOAPString = "<account by='name'>user1</account>";
    	 GetAuthTokenSOAPString = "<password>test123</password>";
    	 GetAuthTokenSOAPString = "</AuthRequest>";
    	 GetAuthTokenSOAPString = "</soap:Body>";
    	 GetAuthTokenSOAPString = "</soap:Envelope>";
    		 
    	 	 
    	try
     	{
     	  	  
    	  URL url = new URL("http://localhost:7070/service/soap");
    	  URLConnection connection = url.openConnection();
    	  connection.setDoOutput(true);
    	  
    	  OutputStreamWriter out1 = new OutputStreamWriter(
                  connection.getOutputStream());
    	  out1.write(GetAuthTokenSOAPString);
    	  out1.close();
    		
    		BufferedReader in = new BufferedReader(
    		new InputStreamReader(
    		connection.getInputStream()));
    		
    		String decodedString;
    		while ((decodedString = in.readLine()) != null) {
    		out.println(decodedString);
    		}
    		in.close();
     	}
    	catch (Exception e)
    	{
    			out.println(e);
    	}
    	%>
    My Code for Batch Request... (Which works)
    Code:
    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <%@ page  language="java" %>
    <%@ page  import="java.io.*" %>
    <%@ page  import="java.net.*" %>
     
     
     <%  
    	 String SOAPstring = "<soap:Envelope xmlns:soap='http://www.w3.org/2003/05/soap-envelope'>\r\n";
    	 SOAPstring += "<soap:Header> ";
    	 SOAPstring += "<context xmlns='urn:zimbra'>";
    	 SOAPstring += "<userAgent name='ZimbraWebClient - FF1.5 (Linux)' version='0.0'/>";
    	 SOAPstring += "<sessionId id='8'/>";
    	 SOAPstring += "<change token='199' type='new'/>";
    	 SOAPstring += "<authToken>0_fda5351a0674d8d0eff356353d20f0c049d05c6c_69643d33363a33616563316263302d646133352d343631652d396438652d3030653538326465353562353b6578703d31333a313139353937383434313439353b</authToken>";
    	 SOAPstring += "<format type='js'/>";
    	 SOAPstring += "</context>";
    	 SOAPstring += "</soap:Header>";
    	 SOAPstring += "<soap:Body>";
    	 //SOAPstring += "<BatchRequest xmlns='urn:zimbra' onerror='continue'>";
    	 //SOAPstring += "<GetApptSummariesRequest xmlns='urn:zimbraMail' s='1195709400000' e='1195792200000' l='10' id='0'/>";
    	 //SOAPstring += "</BatchRequest>";
    	 SOAPstring += "<GetInfoRequest xmlns='urn:zimbraAccount'/>";
    	 SOAPstring += "</soap:Body>";
    	 SOAPstring += "</soap:Envelope>";
    	
    	try
     	{
     	  	  
    	  URL url = new URL("http://localhost:7070/service/soap");
    	  URLConnection connection = url.openConnection();
    	  connection.setDoOutput(true);
    	  
    	  OutputStreamWriter out1 = new OutputStreamWriter(
                  connection.getOutputStream());
    	  out1.write(SOAPstring);
    	  out1.close();
    		
    		BufferedReader in = new BufferedReader(
    		new InputStreamReader(
    		connection.getInputStream()));
    		
    		String decodedString;
    		while ((decodedString = in.readLine()) != null) {
    		out.println(decodedString);
    		}
    		in.close();
     	}
    	catch (Exception e)
    	{
    			out.println(e);
    	}
    	%>

  3. #33
    Join Date
    Sep 2008
    Posts
    3
    Rep Power
    7

    Default

    how about if im running Zimbra on Liferay portal and using it as my mail service?

    thx

  4. #34
    Join Date
    Feb 2009
    Posts
    188
    Rep Power
    6

    Exclamation regarding integration of liferay and zimbra

    I have the same issue,


    any luck bro !!!
    Regards
    Adeel

Similar Threads

  1. Does Zimbra support IMAP Secure Authentication?
    By zzzzsg in forum Administrators
    Replies: 6
    Last Post: 11-06-2009, 06:19 PM
  2. External Authentication with Active Directory via LDAPS
    By merrill in forum Administrators
    Replies: 1
    Last Post: 10-21-2007, 01:13 PM
  3. External LDAP Authentication Issue
    By xtreme-one in forum Installation
    Replies: 10
    Last Post: 02-16-2007, 06:52 PM
  4. Authentication to external ldap stop working.
    By jahaj in forum Installation
    Replies: 3
    Last Post: 12-05-2006, 02:17 PM
  5. ldap external authentication
    By tdi in forum Administrators
    Replies: 2
    Last Post: 10-21-2006, 04:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •