private void processChallenges( final Map<String, Header> challenges, final AuthState authState, final AuthenticationHandler authHandler, final HttpResponse response, final HttpContext context) throws MalformedChallengeException, AuthenticationException { AuthScheme authScheme = authState.getAuthScheme(); if (authScheme == null) { // Authentication not attempted before authScheme = authHandler.selectScheme(challenges, response, context); authState.setAuthScheme(authScheme); } String id = authScheme.getSchemeName(); Header challenge = challenges.get(id.toLowerCase(Locale.ENGLISH)); if (challenge == null) { throw new AuthenticationException(id + " authorization challenge expected, but not found"); } authScheme.processChallenge(challenge); this.log.debug("Authorization challenge processed"); }
private void processChallenges( final Map<String, Header> challenges, final AuthState authState, final AuthenticationHandler authHandler, final HttpResponse response, final HttpContext context) throws MalformedChallengeException, AuthenticationException { AuthScheme authScheme = authState.getAuthScheme(); if (authScheme == null) { // Authentication not attempted before authScheme = authHandler.selectScheme(challenges, response, context); authState.setAuthScheme(authScheme); } String id = authScheme.getSchemeName(); Header challenge = challenges.get(id.toLowerCase(Locale.ENGLISH)); if (challenge == null) { throw new AuthenticationException(id + " authorization challenge expected, but not found"); } authScheme.processChallenge(challenge); this.log.debug("Authorization challenge processed"); }
port, authScheme.getRealm(), authScheme.getSchemeName());
port, authScheme.getRealm(), authScheme.getSchemeName());
@Override public String toString() { final StringBuilder buffer = new StringBuilder(); buffer.append("state:").append(this.state).append(";"); if (this.authScheme != null) { buffer.append("auth scheme:").append(this.authScheme.getSchemeName()).append(";"); } if (this.credentials != null) { buffer.append("credentials present"); } return buffer.toString(); }
@Override public String toString() { final StringBuilder buffer = new StringBuilder(); buffer.append("state:").append(this.state).append(";"); if (this.authScheme != null) { buffer.append("auth scheme:").append(this.authScheme.getSchemeName()).append(";"); } if (this.credentials != null) { buffer.append("credentials present"); } return buffer.toString(); }
@Override public String toString() { final StringBuilder buffer = new StringBuilder(); buffer.append("state:").append(this.state).append(";"); if (this.authScheme != null) { buffer.append("auth scheme:").append(this.authScheme.getSchemeName()).append(";"); } if (this.credentials != null) { buffer.append("credentials present"); } return buffer.toString(); }
protected boolean isCachable(final AuthScheme authScheme) { if (authScheme == null || !authScheme.isComplete()) { return false; } final String schemeName = authScheme.getSchemeName(); return schemeName.equalsIgnoreCase(AuthSchemes.BASIC) || schemeName.equalsIgnoreCase(AuthSchemes.DIGEST); }
protected boolean isCachable(final AuthScheme authScheme) { if (authScheme == null || !authScheme.isComplete()) { return false; } final String schemeName = authScheme.getSchemeName(); return schemeName.equalsIgnoreCase(AuthSchemes.BASIC) || schemeName.equalsIgnoreCase(AuthSchemes.DIGEST); }
public void authFailed( final HttpHost authhost, final AuthScheme authScheme, final HttpContext context) { final AuthCache authCache = (AuthCache) context.getAttribute(ClientContext.AUTH_CACHE); if (authCache == null) { return; } if (this.log.isDebugEnabled()) { this.log.debug("Removing from cache '" + authScheme.getSchemeName() + "' auth scheme for " + authhost); } authCache.remove(authhost); }
private boolean isCachable(final AuthScheme authScheme) { if (authScheme == null || !authScheme.isComplete()) { return false; } final String schemeName = authScheme.getSchemeName(); return schemeName.equalsIgnoreCase(AuthPolicy.BASIC) || schemeName.equalsIgnoreCase(AuthPolicy.DIGEST); }
private void cache(final AuthCache authCache, final HttpHost host, final AuthScheme authScheme) { if (this.log.isDebugEnabled()) { this.log.debug("Caching '" + authScheme.getSchemeName() + "' auth scheme for " + host); } authCache.put(host, authScheme); }
protected boolean isCachable(final AuthScheme authScheme) { if (authScheme == null || !authScheme.isComplete()) { return false; } final String schemeName = authScheme.getSchemeName(); return schemeName.equalsIgnoreCase(AuthSchemes.BASIC); }
protected boolean isCachable(final AuthScheme authScheme) { if (authScheme == null || !authScheme.isComplete()) { return false; } final String schemeName = authScheme.getSchemeName(); return schemeName.equalsIgnoreCase(AuthSchemes.BASIC) || schemeName.equalsIgnoreCase(AuthSchemes.DIGEST); }
private void cache(final AuthCache authCache, final HttpHost host, final AuthScheme authScheme) { if (this.log.isDebugEnabled()) { this.log.debug("Caching '" + authScheme.getSchemeName() + "' auth scheme for " + host); } authCache.put(host, authScheme); }
protected boolean isCachable(final AuthScheme authScheme) { if (authScheme == null || !authScheme.isComplete()) { return false; } final String schemeName = authScheme.getSchemeName(); return schemeName.equalsIgnoreCase(AuthSchemes.BASIC) || schemeName.equalsIgnoreCase(AuthSchemes.DIGEST); }
private boolean isCachable(final AuthScheme authScheme) { if (authScheme == null || !authScheme.isComplete()) { return false; } final String schemeName = authScheme.getSchemeName(); return schemeName.equalsIgnoreCase(AuthPolicy.BASIC) || schemeName.equalsIgnoreCase(AuthPolicy.DIGEST); }
private boolean isCachable(final AuthState authState) { final AuthScheme authScheme = authState.getAuthScheme(); if (authScheme == null || !authScheme.isComplete()) { return false; } final String schemeName = authScheme.getSchemeName(); return schemeName.equalsIgnoreCase(AuthPolicy.BASIC) || schemeName.equalsIgnoreCase(AuthPolicy.DIGEST); }
private boolean isCachable(final AuthState authState) { final AuthScheme authScheme = authState.getAuthScheme(); if (authScheme == null || !authScheme.isComplete()) { return false; } final String schemeName = authScheme.getSchemeName(); return schemeName.equalsIgnoreCase(AuthPolicy.BASIC) || schemeName.equalsIgnoreCase(AuthPolicy.DIGEST); }
private boolean isCachable(final AuthState authState) { final AuthScheme authScheme = authState.getAuthScheme(); if (authScheme == null || !authScheme.isComplete()) { return false; } final String schemeName = authScheme.getSchemeName(); return schemeName.equalsIgnoreCase(AuthPolicy.BASIC) || schemeName.equalsIgnoreCase(AuthPolicy.DIGEST); }