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

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

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

origin: commons-httpclient/commons-httpclient

  return;
if (authstate.isAuthRequested() || !authscheme.isConnectionBased()) {
  AuthScope authscope = new AuthScope(
    conn.getProxyHost(), conn.getProxyPort(), 
    authscheme.getRealm(), 
    authscheme.getSchemeName());  
  if (LOG.isDebugEnabled()) {
    LOG.debug("Authenticating with " + authscope);
    String authstring = authscheme.authenticate(credentials, method);
    if (authstring != null) {
      method.addRequestHeader(new Header(PROXY_AUTH_RESP, authstring, true));
origin: commons-httpclient/commons-httpclient

  authscheme.getRealm(), 
  authscheme.getSchemeName());  
if (authstate.isAuthAttempted() && authscheme.isComplete()) {
origin: commons-httpclient/commons-httpclient

String id = authscheme.getSchemeName();
if (LOG.isDebugEnabled()) {
  LOG.debug("Using authentication scheme: " + id);
    " authorization challenge expected, but not found");
authscheme.processChallenge(challenge);
LOG.debug("Authorization challenge processed");
return authscheme;
origin: commons-httpclient/commons-httpclient

  public String toString() {
    StringBuffer buffer = new StringBuffer();
    buffer.append("Auth state: auth requested [");
    buffer.append(this.authRequested);
    buffer.append("]; auth attempted [");
    buffer.append(this.authAttempted);
    if (this.authScheme != null) {
      buffer.append("]; auth scheme [");
      buffer.append(this.authScheme.getSchemeName());
      buffer.append("]; realm [");
      buffer.append(this.authScheme.getRealm());            
    }
    buffer.append("] preemptive [");
    buffer.append(this.preemptive);
    buffer.append("]");
    return buffer.toString();
  }
}
origin: commons-httpclient/commons-httpclient

String realm = authscheme.getRealm();
if (LOG.isDebugEnabled()) {
  StringBuffer buffer = new StringBuffer();
  throw new CredentialsNotAvailableException(buffer.toString());
String auth = authscheme.authenticate(credentials, method);
if (auth != null) {
  String s = proxy ? PROXY_AUTH_RESP : WWW_AUTH_RESP;
origin: commons-httpclient/commons-httpclient

/**
 * Returns the authentication realm.
 * 
 * @return the name of the authentication realm
 */
public String getRealm() {
  if (this.authScheme != null) {
    return this.authScheme.getRealm();
  } else {
    return null;
  }
}

origin: edu.ucar/netcdf

if(retryCount == 0 && authstate.isAuthAttempted() && authscheme.isComplete()) {
  return null; // Stop the retry.
Credentials credentials = null;
scheme = HTTPAuthScheme.schemeForName(authscheme.getSchemeName());
  LOG.error("HTTPAuthProvider: unsupported scheme: "+authscheme.getSchemeName());
origin: org.jvnet.hudson/htmlunit

/**
 * @param scheme the request scheme for which Credentials are asked
 * @param scope the configured authorization scope
 * @return <code>true</code> if the scope's scheme matches the provided one
 */
protected boolean matchScheme(final AuthScope scope, final AuthScheme scheme) {
  return scope.getScheme() == AuthScope.ANY_SCHEME || scope.getScheme().equals(scheme.getSchemeName());
}
origin: org.jvnet.hudson/htmlunit

/**
 * Builds a key with the specified data.
 * @param scheme the scheme
 * @param host the server name
 * @param port the server port
 * @param proxy is proxy
 * @return the new key
 */
protected Object buildKey(final AuthScheme scheme, final String host, final int port, final boolean proxy) {
  return scheme.getSchemeName() + " " + scheme.getRealm() + " " + host + ":" + port + " " + proxy;
}
origin: org.wso2.commons-httpclient/commons-httpclient

String realm = authscheme.getRealm();
if (LOG.isDebugEnabled()) {
  StringBuffer buffer = new StringBuffer();
  throw new CredentialsNotAvailableException(buffer.toString());
String auth = authscheme.authenticate(credentials, method);
if (auth != null) {
  String s = proxy ? PROXY_AUTH_RESP : WWW_AUTH_RESP;
origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * Returns the authentication realm.
 * 
 * @return the name of the authentication realm
 */
public String getRealm() {
  if (this.authScheme != null) {
    return this.authScheme.getRealm();
  } else {
    return null;
  }
}

origin: org.jenkins-ci/htmlunit

/**
 * @param scheme the request scheme for which Credentials are asked
 * @param scope the configured authorization scope
 * @return <code>true</code> if the scope's scheme matches the provided one
 */
protected boolean matchScheme(final AuthScope scope, final AuthScheme scheme) {
  return scope.getScheme() == AuthScope.ANY_SCHEME || scope.getScheme().equals(scheme.getSchemeName());
}
origin: commons-httpclient/commons-httpclient

  return;
if (authstate.isAuthRequested() || !authscheme.isConnectionBased()) {
  String host = method.getParams().getVirtualHost();
  if (host == null) {
  AuthScope authscope = new AuthScope(
    host, port, 
    authscheme.getRealm(), 
    authscheme.getSchemeName());  
  if (LOG.isDebugEnabled()) {
    LOG.debug("Authenticating with " + authscope);
    String authstring = authscheme.authenticate(credentials, method);
    if (authstring != null) {
      method.addRequestHeader(new Header(WWW_AUTH_RESP, authstring, true));
origin: commons-httpclient/commons-httpclient

AuthScope authscope = new AuthScope(
  host, port, 
  authscheme.getRealm(), 
  authscheme.getSchemeName());
if (authstate.isAuthAttempted() && authscheme.isComplete()) {
origin: org.jenkins-ci/htmlunit

/**
 * Builds a key with the specified data.
 * @param scheme the scheme
 * @param host the server name
 * @param port the server port
 * @param proxy is proxy
 * @return the new key
 */
protected Object buildKey(final AuthScheme scheme, final String host, final int port, final boolean proxy) {
  return scheme.getSchemeName() + " " + scheme.getRealm() + " " + host + ":" + port + " " + proxy;
}
origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

String realm = authscheme.getRealm();
if (LOG.isDebugEnabled()) {
  StringBuffer buffer = new StringBuffer();
  throw new CredentialsNotAvailableException(buffer.toString());
String auth = authscheme.authenticate(credentials, method);
if (auth != null) {
  String s = proxy ? PROXY_AUTH_RESP : WWW_AUTH_RESP;
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

String id = authscheme.getSchemeName();
if (LOG.isDebugEnabled()) {
  LOG.debug("Using authentication scheme: " + id);
    " authorization challenge expected, but not found");
authscheme.processChallenge(challenge);
LOG.debug("Authorization challenge processed");
return authscheme;
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * Returns the authentication realm.
 * 
 * @return the name of the authentication realm
 */
public String getRealm() {
  if (this.authScheme != null) {
    return this.authScheme.getRealm();
  } else {
    return null;
  }
}

origin: net.disy.htmlunit/htmlunit

/**
 * @param scheme the request scheme for which Credentials are asked
 * @param scope the configured authorization scope
 * @return <code>true</code> if the scope's scheme matches the provided one
 */
protected boolean matchScheme(final AuthScope scope, final AuthScheme scheme) {
  return scope.getScheme() == AuthScope.ANY_SCHEME || scope.getScheme().equals(scheme.getSchemeName());
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

  return;
if (authstate.isAuthRequested() || !authscheme.isConnectionBased()) {
  AuthScope authscope = new AuthScope(
    conn.getProxyHost(), conn.getProxyPort(), 
    authscheme.getRealm(), 
    authscheme.getSchemeName());  
  if (LOG.isDebugEnabled()) {
    LOG.debug("Authenticating with " + authscope);
    String authstring = authscheme.authenticate(credentials, method);
    if (authstring != null) {
      method.addRequestHeader(new Header(PROXY_AUTH_RESP, authstring, true));
org.apache.commons.httpclient.authAuthScheme

Javadoc

This interface represents an abstract challenge-response oriented authentication scheme.

An authentication scheme should be able to support the following functions:

  • Parse and process the challenge sent by the targer server in response to request for a protected resource
  • Provide its textual designation
  • Provide its parameters, if available
  • Provide the realm this authentication scheme is applicable to, if available
  • Generate authorization string for the given set of credentials, request method and URI as specificed in the HTTP request line in response to the actual authorization challenge

Authentication schemes may ignore method name and URI parameters if they are not relevant for the given authentication mechanism

Authentication schemes may be stateful involving a series of challenge-response exchanges

Most used methods

  • getRealm
    Returns authentication realm. If the concept of an authentication realm is not applicable to the giv
  • getSchemeName
    Returns textual designation of the given authentication scheme.
  • isComplete
    Authentication process may involve a series of challenge-response exchanges. This method tests if th
  • authenticate
    Produces an authorization string for the given set of Credentials.
  • isConnectionBased
    Tests if the authentication scheme is provides authorization on a per connection basis instead of us
  • processChallenge
    Processes the given challenge token. Some authentication schemes may involve multiple challenge-resp

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • notifyDataSetChanged (ArrayAdapter)
  • getSharedPreferences (Context)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Path (java.nio.file)
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • From CI to AI: The AI layer in your organization
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