Examples of NTLM


Examples of com.google.code.com.sun.mail.auth.Ntlm

  String type1Msg = null;
  int flags = PropUtil.getIntProperty(props,
      "mail." + name + ".auth.ntlm.flags", 0);
  String domain = props.getProperty(
      "mail." + name + ".auth.ntlm.domain", "");
  Ntlm ntlm = new Ntlm(domain, getLocalHost(), u, p, debug ? out : null);

  try {
      tag = writeCommand("AUTHENTICATE NTLM", null);
  } catch (Exception ex) {
      // Convert this into a BYE response
      r = Response.byeResponse(ex);
      done = true;
  }

  OutputStream os = getOutputStream(); // stream to IMAP server
  boolean first = true;

  while (!done) { // loop till we are done
      try {
    r = readResponse();
        if (r.isContinuation()) {
        // Server challenge ..
        String s;
        if (first) {
      s = ntlm.generateType1Msg(flags);
      first = false;
        } else {
      s = ntlm.generateType3Msg(r.getRest());
        }

        os.write(ASCIIUtility.getBytes(s));
        os.write(CRLF);   // CRLF termination
        os.flush();   // flush the stream
View Full Code Here

Examples of com.google.code.com.sun.mail.auth.Ntlm

  String type1Msg = null;
  int flags = PropUtil.getIntProperty(props,
      "mail." + name + ".auth.ntlm.flags", 0);
  String domain = props.getProperty(
      "mail." + name + ".auth.ntlm.domain", "");
  Ntlm ntlm = new Ntlm(domain, getLocalHost(), u, p, debug ? out : null);

  try {
      tag = writeCommand("AUTHENTICATE NTLM", null);
  } catch (Exception ex) {
      // Convert this into a BYE response
      r = Response.byeResponse(ex);
      done = true;
  }

  OutputStream os = getOutputStream(); // stream to IMAP server
  boolean first = true;

  while (!done) { // loop till we are done
      try {
    r = readResponse();
        if (r.isContinuation()) {
        // Server challenge ..
        String s;
        if (first) {
      s = ntlm.generateType1Msg(flags);
      first = false;
        } else {
      s = ntlm.generateType3Msg(r.getRest());
        }

        os.write(ASCIIUtility.getBytes(s));
        os.write(CRLF);   // CRLF termination
        os.flush();   // flush the stream
View Full Code Here

Examples of com.google.code.com.sun.mail.auth.Ntlm

  String type1Msg = null;
  int flags = PropUtil.getIntProperty(props,
      "mail." + name + ".auth.ntlm.flags", 0);
  String domain = props.getProperty(
      "mail." + name + ".auth.ntlm.domain", "");
  Ntlm ntlm = new Ntlm(domain, getLocalHost(), u, p, debug ? out : null);

  try {
      tag = writeCommand("AUTHENTICATE NTLM", null);
  } catch (Exception ex) {
      // Convert this into a BYE response
      r = Response.byeResponse(ex);
      done = true;
  }

  OutputStream os = getOutputStream(); // stream to IMAP server
  boolean first = true;

  while (!done) { // loop till we are done
      try {
    r = readResponse();
        if (r.isContinuation()) {
        // Server challenge ..
        String s;
        if (first) {
      s = ntlm.generateType1Msg(flags);
      first = false;
        } else {
      s = ntlm.generateType3Msg(r.getRest());
        }

        os.write(ASCIIUtility.getBytes(s));
        os.write(CRLF);   // CRLF termination
        os.flush();   // flush the stream
View Full Code Here

Examples of com.sun.mail.auth.Ntlm

  String type1Msg = null;
  int flags = PropUtil.getIntProperty(props,
      "mail." + name + ".auth.ntlm.flags", 0);
  String domain = props.getProperty(
      "mail." + name + ".auth.ntlm.domain", "");
  Ntlm ntlm = new Ntlm(domain, getLocalHost(), u, p, debug ? out : null);

  try {

  if (noauthdebug) {
      out.println(
    "DEBUG IMAP: AUTHENTICATE NTLM command trace suppressed");
      suspendTracing();
  }

  try {
      tag = writeCommand("AUTHENTICATE NTLM", null);
  } catch (Exception ex) {
      // Convert this into a BYE response
      r = Response.byeResponse(ex);
      done = true;
  }

  OutputStream os = getOutputStream(); // stream to IMAP server
  boolean first = true;

  while (!done) { // loop till we are done
      try {
    r = readResponse();
        if (r.isContinuation()) {
        // Server challenge ..
        String s;
        if (first) {
      s = ntlm.generateType1Msg(flags);
      first = false;
        } else {
      s = ntlm.generateType3Msg(r.getRest());
        }
        os.write(ASCIIUtility.getBytes(s));
        os.write(CRLF);   // CRLF termination
        os.flush();   // flush the stream
View Full Code Here

Examples of com.sun.mail.auth.Ntlm

   * Generate the first response right away because Ntlm will
   * return null if the NTLM authentication support isn't
   * available and then we can fail cleanly without invoking
   * the AUTHENTICATE command.
   */
  Ntlm ntlm = new Ntlm(debug ? out : null);
  int flags = 0;
  String domain = null;
  String type1Msg = null;
  try {
      flags = PropUtil.getIntProperty(props,
    "mail." + name + ".auth.ntlm.flags", 0);
      boolean useUnicode = PropUtil.getBooleanProperty(props,
    "mail." + name + ".auth.ntlm.unicode", true);
      domain = props.getProperty(
    "mail." + name + ".auth.ntlm.domain", "");
      type1Msg = ntlm.generateType1Msg(useUnicode, flags,
    domain, getLocalHost());
      if (type1Msg == null) {
    if (debug)
        out.println("IMAP DEBUG: Can't load NTLM authenticator");
    throw new ProtocolException("Can't load NTLM authenticator");
      }
  } catch (IOException ex) {
      throw new ProtocolException("Error generating NTLM response", ex);
  }

  try {
      tag = writeCommand("AUTHENTICATE NTLM", null);
  } catch (Exception ex) {
      // Convert this into a BYE response
      r = Response.byeResponse(ex);
      done = true;
  }

  OutputStream os = getOutputStream(); // stream to IMAP server
  boolean first = true;

  while (!done) { // loop till we are done
      try {
    r = readResponse();
        if (r.isContinuation()) {
        // Server challenge ..
        String s;
        if (first) {
      s = type1Msg;
      first = false;
        } else {
      int lmCompatibility = PropUtil.getIntProperty(props,
          "mail." + name + ".auth.ntlm.lmcompat", 3);
      s = ntlm.generateType3Msg(u, p,
          domain, getLocalHost(),
          r.getRest(),
          flags,
          lmCompatibility);
        }
View Full Code Here

Examples of org.apache.commons.httpclient.NTLM

        if (credentials == null) {
            throw new IllegalArgumentException("Credentials may not be null");
        }
       
        NTLM ntlm = new NTLM();
        String s = null;
        try {
            s = ntlm.getResponseFor(challenge,
              credentials.getUserName(), credentials.getPassword(),
              credentials.getHost(), credentials.getDomain());
        } catch (HttpException e) {
            throw new AuthenticationException(e.getMessage());
        }
View Full Code Here

Examples of org.apache.commons.httpclient.NTLM

        if (credentials == null) {
            throw new IllegalArgumentException("Credentials may not be null");
        }
       
        NTLM ntlm = new NTLM();
        String s = null;
        try {
            s = ntlm.getResponseFor(challenge,
              credentials.getUserName(), credentials.getPassword(),
              credentials.getHost(), credentials.getDomain());
        } catch (HttpException e) {
            throw new AuthenticationException(e.getMessage());
        }
View Full Code Here

Examples of org.apache.commons.httpclient.NTLM

        if (credentials == null) {
            throw new IllegalArgumentException("Credentials may not be null");
        }
       
        NTLM ntlm = new NTLM();
        String s = null;
        try {
            s = ntlm.getResponseFor(challenge,
              credentials.getUserName(), credentials.getPassword(),
              credentials.getHost(), credentials.getDomain());
        } catch (HttpException e) {
            throw new AuthenticationException(e.getMessage());
        }
View Full Code Here

Examples of org.apache.commons.httpclient.NTLM

        if (credentials == null) {
            throw new IllegalArgumentException("Credentials may not be null");
        }
       
        NTLM ntlm = new NTLM();
        String s = null;
        try {
            s = ntlm.getResponseFor(challenge,
              credentials.getUserName(), credentials.getPassword(),
              credentials.getHost(), credentials.getDomain());
        } catch (HttpException e) {
            throw new AuthenticationException(e.getMessage());
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.