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
  • getSharedPreferences (Context)
  • getExternalFilesDir (Context)
  • startActivity (Activity)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • 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