Tabnine Logo
NTLMScheme
Code IndexAdd Tabnine to your IDE (free)

How to use
NTLMScheme
in
org.apache.commons.httpclient.auth

Best Java code snippets using org.apache.commons.httpclient.auth.NTLMScheme (Showing top 20 results out of 315)

origin: commons-httpclient/commons-httpclient

return new NTLMScheme(challenge);
origin: commons-httpclient/commons-httpclient

/**
 * Produces NTLM authorization string for the given set of 
 * {@link Credentials}.
 * 
 * @param credentials The set of credentials to be used for athentication
 * @param method Method name is ignored by the NTLM authentication scheme
 * @param uri URI is ignored by the NTLM authentication scheme
 * @throws InvalidCredentialsException if authentication credentials
 *         are not valid or not applicable for this authentication scheme
 * @throws AuthenticationException if authorization string cannot 
 *   be generated due to an authentication failure
 * 
 * @return an NTLM authorization string
 * 
 * @deprecated Use {@link #authenticate(Credentials, HttpMethod)}
 */
public String authenticate(Credentials credentials, String method, String uri) 
 throws AuthenticationException {
  LOG.trace("enter NTLMScheme.authenticate(Credentials, String, String)");
  NTCredentials ntcredentials = null;
  try {
    ntcredentials = (NTCredentials) credentials;
  } catch (ClassCastException e) {
    throw new InvalidCredentialsException(
     "Credentials cannot be used for NTLM authentication: " 
     + credentials.getClass().getName());
  }
  return NTLMScheme.authenticate(ntcredentials, this.ntlmchallenge);
}

origin: commons-httpclient/commons-httpclient

/**
 * Processes the NTLM challenge.
 *  
 * @param challenge the challenge string
 * 
 * @throws MalformedChallengeException is thrown if the authentication challenge
 * is malformed
 * 
 * @since 3.0
 */
public void processChallenge(final String challenge) throws MalformedChallengeException {
  String s = AuthChallengeParser.extractScheme(challenge);
  if (!s.equalsIgnoreCase(getSchemeName())) {
    throw new MalformedChallengeException("Invalid NTLM challenge: " + challenge);
  }
  int i = challenge.indexOf(' ');
  if (i != -1) {
    s = challenge.substring(i, challenge.length());
    this.ntlmchallenge = s.trim();
    this.state = TYPE2_MSG_RECEIVED;
  } else {
    this.ntlmchallenge = "";
    if (this.state == UNINITIATED) {
      this.state = INITIATED;
    } else {
      this.state = FAILED;
    }
  }
}
origin: commons-httpclient/commons-httpclient

/**
 * Constructor for the NTLM authentication scheme.
 * 
 * @param challenge The authentication challenge
 * 
 * @throws MalformedChallengeException is thrown if the authentication challenge
 * is malformed
 */
public NTLMScheme(final String challenge) throws MalformedChallengeException {
  super();
  processChallenge(challenge);
}
origin: org.apache.commons/httpclient

/**
 * Constructor for the NTLM authentication scheme.
 * 
 * @param challenge The authentication challenge
 * 
 * @throws MalformedChallengeException is thrown if the authentication challenge
 * is malformed
 */
public NTLMScheme(final String challenge) throws MalformedChallengeException {
  super();
  processChallenge(challenge);
}
origin: org.wso2.commons-httpclient/commons-httpclient

/**
 * Constructor for the NTLM authentication scheme.
 * 
 * @param challenge The authentication challenge
 * 
 * @throws MalformedChallengeException is thrown if the authentication challenge
 * is malformed
 */
public NTLMScheme(final String challenge) throws MalformedChallengeException {
  super();
  processChallenge(challenge);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * Produces NTLM authorization string for the given set of 
 * {@link Credentials}.
 * 
 * @param credentials The set of credentials to be used for athentication
 * @param method Method name is ignored by the NTLM authentication scheme
 * @param uri URI is ignored by the NTLM authentication scheme
 * @throws InvalidCredentialsException if authentication credentials
 *         are not valid or not applicable for this authentication scheme
 * @throws AuthenticationException if authorization string cannot 
 *   be generated due to an authentication failure
 * 
 * @return an NTLM authorization string
 * 
 * @deprecated Use {@link #authenticate(Credentials, HttpMethod)}
 */
public String authenticate(Credentials credentials, String method, String uri) 
 throws AuthenticationException {
  LOG.trace("enter NTLMScheme.authenticate(Credentials, String, String)");
  NTCredentials ntcredentials = null;
  try {
    ntcredentials = (NTCredentials) credentials;
  } catch (ClassCastException e) {
    throw new InvalidCredentialsException(
     "Credentials cannot be used for NTLM authentication: " 
     + credentials.getClass().getName());
  }
  return NTLMScheme.authenticate(ntcredentials, this.ntlmchallenge);
}

origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * Processes the NTLM challenge.
 *  
 * @param challenge the challenge string
 * 
 * @throws MalformedChallengeException is thrown if the authentication challenge
 * is malformed
 * 
 * @since 3.0
 */
public void processChallenge(final String challenge) throws MalformedChallengeException {
  String s = AuthChallengeParser.extractScheme(challenge);
  if (!s.equalsIgnoreCase(getSchemeName())) {
    throw new MalformedChallengeException("Invalid NTLM challenge: " + challenge);
  }
  int i = challenge.indexOf(' ');
  if (i != -1) {
    s = challenge.substring(i, challenge.length());
    this.ntlmchallenge = s.trim();
    this.state = TYPE2_MSG_RECEIVED;
  } else {
    this.ntlmchallenge = "";
    if (this.state == UNINITIATED) {
      this.state = INITIATED;
    } else {
      this.state = FAILED;
    }
  }
}
origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

return new NTLMScheme(challenge);
origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * Constructor for the NTLM authentication scheme.
 * 
 * @param challenge The authentication challenge
 * 
 * @throws MalformedChallengeException is thrown if the authentication challenge
 * is malformed
 */
public NTLMScheme(final String challenge) throws MalformedChallengeException {
  super();
  processChallenge(challenge);
}
origin: org.wso2.commons-httpclient/commons-httpclient

/**
 * Produces NTLM authorization string for the given set of 
 * {@link Credentials}.
 * 
 * @param credentials The set of credentials to be used for athentication
 * @param method Method name is ignored by the NTLM authentication scheme
 * @param uri URI is ignored by the NTLM authentication scheme
 * @throws InvalidCredentialsException if authentication credentials
 *         are not valid or not applicable for this authentication scheme
 * @throws AuthenticationException if authorization string cannot 
 *   be generated due to an authentication failure
 * 
 * @return an NTLM authorization string
 * 
 * @deprecated Use {@link #authenticate(Credentials, HttpMethod)}
 */
public String authenticate(Credentials credentials, String method, String uri) 
 throws AuthenticationException {
  LOG.trace("enter NTLMScheme.authenticate(Credentials, String, String)");
  NTCredentials ntcredentials = null;
  try {
    ntcredentials = (NTCredentials) credentials;
  } catch (ClassCastException e) {
    throw new InvalidCredentialsException(
     "Credentials cannot be used for NTLM authentication: " 
     + credentials.getClass().getName());
  }
  return NTLMScheme.authenticate(ntcredentials, this.ntlmchallenge);
}

origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * Processes the NTLM challenge.
 *  
 * @param challenge the challenge string
 * 
 * @throws MalformedChallengeException is thrown if the authentication challenge
 * is malformed
 * 
 * @since 3.0
 */
public void processChallenge(final String challenge) throws MalformedChallengeException {
  String s = AuthChallengeParser.extractScheme(challenge);
  if (!s.equalsIgnoreCase(getSchemeName())) {
    throw new MalformedChallengeException("Invalid NTLM challenge: " + challenge);
  }
  int i = challenge.indexOf(' ');
  if (i != -1) {
    s = challenge.substring(i, challenge.length());
    this.ntlmchallenge = s.trim();
    this.state = TYPE2_MSG_RECEIVED;
  } else {
    this.ntlmchallenge = "";
    if (this.state == UNINITIATED) {
      this.state = INITIATED;
    } else {
      this.state = FAILED;
    }
  }
}
origin: org.apache.commons/httpclient

return new NTLMScheme(challenge);
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * Constructor for the NTLM authentication scheme.
 * 
 * @param challenge The authentication challenge
 * 
 * @throws MalformedChallengeException is thrown if the authentication challenge
 * is malformed
 */
public NTLMScheme(final String challenge) throws MalformedChallengeException {
  super();
  processChallenge(challenge);
}
origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * Produces NTLM authorization string for the given set of 
 * {@link Credentials}.
 * 
 * @param credentials The set of credentials to be used for athentication
 * @param method Method name is ignored by the NTLM authentication scheme
 * @param uri URI is ignored by the NTLM authentication scheme
 * @throws InvalidCredentialsException if authentication credentials
 *         are not valid or not applicable for this authentication scheme
 * @throws AuthenticationException if authorization string cannot 
 *   be generated due to an authentication failure
 * 
 * @return an NTLM authorization string
 * 
 * @deprecated Use {@link #authenticate(Credentials, HttpMethod)}
 */
public String authenticate(Credentials credentials, String method, String uri) 
 throws AuthenticationException {
  LOG.trace("enter NTLMScheme.authenticate(Credentials, String, String)");
  NTCredentials ntcredentials = null;
  try {
    ntcredentials = (NTCredentials) credentials;
  } catch (ClassCastException e) {
    throw new InvalidCredentialsException(
     "Credentials cannot be used for NTLM authentication: " 
     + credentials.getClass().getName());
  }
  return NTLMScheme.authenticate(ntcredentials, this.ntlmchallenge);
}

origin: org.apache.commons/httpclient

/**
 * Processes the NTLM challenge.
 *  
 * @param challenge the challenge string
 * 
 * @throws MalformedChallengeException is thrown if the authentication challenge
 * is malformed
 * 
 * @since 3.0
 */
public void processChallenge(final String challenge) throws MalformedChallengeException {
  String s = AuthChallengeParser.extractScheme(challenge);
  if (!s.equalsIgnoreCase(getSchemeName())) {
    throw new MalformedChallengeException("Invalid NTLM challenge: " + challenge);
  }
  int i = challenge.indexOf(' ');
  if (i != -1) {
    s = challenge.substring(i, challenge.length());
    this.ntlmchallenge = s.trim();
    this.state = TYPE2_MSG_RECEIVED;
  } else {
    this.ntlmchallenge = "";
    if (this.state == UNINITIATED) {
      this.state = INITIATED;
    } else {
      this.state = FAILED;
    }
  }
}
origin: org.wso2.commons-httpclient/commons-httpclient

return new NTLMScheme(challenge);
origin: org.apache.commons/httpclient

/**
 * Produces NTLM authorization string for the given set of 
 * {@link Credentials}.
 * 
 * @param credentials The set of credentials to be used for athentication
 * @param method Method name is ignored by the NTLM authentication scheme
 * @param uri URI is ignored by the NTLM authentication scheme
 * @throws InvalidCredentialsException if authentication credentials
 *         are not valid or not applicable for this authentication scheme
 * @throws AuthenticationException if authorization string cannot 
 *   be generated due to an authentication failure
 * 
 * @return an NTLM authorization string
 * 
 * @deprecated Use {@link #authenticate(Credentials, HttpMethod)}
 */
public String authenticate(Credentials credentials, String method, String uri) 
 throws AuthenticationException {
  LOG.trace("enter NTLMScheme.authenticate(Credentials, String, String)");
  NTCredentials ntcredentials = null;
  try {
    ntcredentials = (NTCredentials) credentials;
  } catch (ClassCastException e) {
    throw new InvalidCredentialsException(
     "Credentials cannot be used for NTLM authentication: " 
     + credentials.getClass().getName());
  }
  return NTLMScheme.authenticate(ntcredentials, this.ntlmchallenge);
}

origin: org.wso2.commons-httpclient/commons-httpclient

/**
 * Processes the NTLM challenge.
 *  
 * @param challenge the challenge string
 * 
 * @throws MalformedChallengeException is thrown if the authentication challenge
 * is malformed
 * 
 * @since 3.0
 */
public void processChallenge(final String challenge) throws MalformedChallengeException {
  String s = AuthChallengeParser.extractScheme(challenge);
  if (!s.equalsIgnoreCase(getSchemeName())) {
    throw new MalformedChallengeException("Invalid NTLM challenge: " + challenge);
  }
  int i = challenge.indexOf(' ');
  if (i != -1) {
    s = challenge.substring(i, challenge.length());
    this.ntlmchallenge = s.trim();
    this.state = TYPE2_MSG_RECEIVED;
  } else {
    this.ntlmchallenge = "";
    if (this.state == UNINITIATED) {
      this.state = INITIATED;
    } else {
      this.state = FAILED;
    }
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

return new NTLMScheme(challenge);
org.apache.commons.httpclient.authNTLMScheme

Javadoc

An implementation of the Microsoft proprietary NTLM authentication scheme. For a detailed explanation of the NTLM scheme please see http://davenport.sourceforge.net/ntlm.html.

Most used methods

  • <init>
    Constructor for the NTLM authentication scheme.
  • authenticate
    Create a NTLM authorization string for the given challenge and NT credentials.
  • getSchemeName
    Returns textual designation of the NTLM authentication scheme.
  • processChallenge
    Processes the NTLM challenge.

Popular in Java

  • Creating JSON documents from java classes using gson
  • onRequestPermissionsResult (Fragment)
  • putExtra (Intent)
  • setScale (BigDecimal)
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JTable (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Join (org.hibernate.mapping)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now