org.apache.commons.httpclient.auth.AuthChallengeParser.extractParams()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(67)

本文整理了Java中org.apache.commons.httpclient.auth.AuthChallengeParser.extractParams()方法的一些代码示例,展示了AuthChallengeParser.extractParams()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AuthChallengeParser.extractParams()方法的具体详情如下:
包路径:org.apache.commons.httpclient.auth.AuthChallengeParser
类名称:AuthChallengeParser
方法名:extractParams

AuthChallengeParser.extractParams介绍

[英]Extracts a map of challenge parameters from an authentication challenge. Keys in the map are lower-cased
[中]从身份验证质询中提取质询参数的映射。地图中的键是小写的

代码示例

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Processes the given challenge token. Some authentication schemes
 * may involve multiple challenge-response exchanges. Such schemes must be able 
 * to maintain the state information when dealing with sequential challenges 
 * 
 * @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 " + getSchemeName() + " challenge: " + challenge); 
  }
  this.params = AuthChallengeParser.extractParams(challenge);
}

代码示例来源:origin: nextcloud/android-library

/**
 * Processes the Bearer challenge.
 *  
 * @param   challenge                   The challenge string
 * 
 * @throws MalformedChallengeException  Thrown if the authentication challenge is malformed
 */
public void processChallenge(String challenge) throws MalformedChallengeException {
  String s = AuthChallengeParser.extractScheme(challenge);
  if (!s.equalsIgnoreCase(getSchemeName())) {
    throw new MalformedChallengeException(
     "Invalid " + getSchemeName() + " challenge: " + challenge); 
  }
  mParams = AuthChallengeParser.extractParams(challenge);
  mComplete = true;
}

代码示例来源:origin: org.apache.commons/httpclient

/**
 * Processes the given challenge token. Some authentication schemes
 * may involve multiple challenge-response exchanges. Such schemes must be able 
 * to maintain the state information when dealing with sequential challenges 
 * 
 * @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 " + getSchemeName() + " challenge: " + challenge); 
  }
  this.params = AuthChallengeParser.extractParams(challenge);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * Processes the given challenge token. Some authentication schemes
 * may involve multiple challenge-response exchanges. Such schemes must be able 
 * to maintain the state information when dealing with sequential challenges 
 * 
 * @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 " + getSchemeName() + " challenge: " + challenge); 
  }
  this.params = AuthChallengeParser.extractParams(challenge);
}

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * Processes the given challenge token. Some authentication schemes
 * may involve multiple challenge-response exchanges. Such schemes must be able 
 * to maintain the state information when dealing with sequential challenges 
 * 
 * @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 " + getSchemeName() + " challenge: " + challenge); 
  }
  this.params = AuthChallengeParser.extractParams(challenge);
}

代码示例来源:origin: org.wso2.commons-httpclient/commons-httpclient

/**
 * Processes the given challenge token. Some authentication schemes
 * may involve multiple challenge-response exchanges. Such schemes must be able 
 * to maintain the state information when dealing with sequential challenges 
 * 
 * @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 " + getSchemeName() + " challenge: " + challenge); 
  }
  this.params = AuthChallengeParser.extractParams(challenge);
}

相关文章

微信公众号

最新文章

更多