Package hamsam.util.net.ssl

Examples of hamsam.util.net.ssl.HamsamHttpsConnection


   * @param password   password for login
   * @return the challenge response to be sent to notification server.
   */
  private static String loginServerAuthenticate(String url, ProxyInfo info, String challenge, String username, String password) throws IOException
  {
    HamsamHttpsConnection conn = new HamsamHttpsConnection(url, info);
    conn.setHeaderField("Authorization", "Passport1.4 " +
              "OrgVerb=GET," +
              "OrgURL=http%3A%2F%2Fmessenger%2Emsn%2Ecom," +
              "sign-in=" + urlEncode(username) + "," +
              "pwd=" + password + "," +
              challenge);
    conn.setHeaderField("User-Agent", "MSMSGS");
    conn.doRequest();

    String ret = conn.getHeaderField("Authentication-Info");
    int start = ret.indexOf("da-status=") + 10;
    int end = ret.indexOf(',', start);
    String status = ret.substring(start, end);
    if(!"success".equals(status))
      return null;
View Full Code Here


   * @param info the proxy information.
   * @return url of passport login server
   */
  private static String getPassportLoginServer(ProxyInfo info) throws IOException
  {
    HamsamHttpsConnection conn = new HamsamHttpsConnection("https://nexus.passport.com/rdr/pprdr.asp", info);
    conn.doRequest();
    String header = conn.getHeaderField("PassportURLs");
    int start = header.indexOf("DALogin=") + 8;
    int end = header.indexOf(',', start);
    return "https://" + header.substring(start, end);
  }
View Full Code Here

TOP

Related Classes of hamsam.util.net.ssl.HamsamHttpsConnection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.