public class HttpSignatureAuthenticationStrategy extends Object implements org.apache.http.client.AuthenticationStrategy
AuthenticationStrategy implementation that allows the Apache HTTP
Client to authenticate via the HTTP Signature scheme.| Constructor and Description |
|---|
HttpSignatureAuthenticationStrategy(org.apache.http.auth.AuthScheme authScheme,
org.apache.http.auth.Credentials credentials)
Creates a new instance using the passed authentication scheme.
|
HttpSignatureAuthenticationStrategy(org.apache.http.config.Lookup<org.apache.http.auth.AuthSchemeProvider> authSchemeProviderLookup,
org.apache.http.auth.Credentials credentials)
Create a new instance using a provider found via a
Lookup. |
| Modifier and Type | Method and Description |
|---|---|
void |
authFailed(org.apache.http.HttpHost authhost,
org.apache.http.auth.AuthScheme authScheme,
org.apache.http.protocol.HttpContext context) |
void |
authSucceeded(org.apache.http.HttpHost authhost,
org.apache.http.auth.AuthScheme authScheme,
org.apache.http.protocol.HttpContext context) |
Map<String,org.apache.http.Header> |
getChallenges(org.apache.http.HttpHost authhost,
org.apache.http.HttpResponse response,
org.apache.http.protocol.HttpContext context) |
boolean |
isAuthenticationRequested(org.apache.http.HttpHost authHost,
org.apache.http.HttpResponse response,
org.apache.http.protocol.HttpContext context)
Determines if the given HTTP response response represents
an authentication challenge that was sent back as a result
of authentication failure.
|
Queue<org.apache.http.auth.AuthOption> |
select(Map<String,org.apache.http.Header> challengeHeaders,
org.apache.http.HttpHost authhost,
org.apache.http.HttpResponse response,
org.apache.http.protocol.HttpContext context) |
public HttpSignatureAuthenticationStrategy(org.apache.http.config.Lookup<org.apache.http.auth.AuthSchemeProvider> authSchemeProviderLookup,
org.apache.http.auth.Credentials credentials)
Lookup.authSchemeProviderLookup - Lookup that will return an AuthScheme
when asked for "Signatures"credentials - credentials containing the HTTP Signature usernamepublic HttpSignatureAuthenticationStrategy(org.apache.http.auth.AuthScheme authScheme,
org.apache.http.auth.Credentials credentials)
authScheme - authentication scheme to use to authenticate
requests (expecting HttpSignatureAuthScheme)credentials - credentials containing the HTTP Signature usernamepublic boolean isAuthenticationRequested(org.apache.http.HttpHost authHost,
org.apache.http.HttpResponse response,
org.apache.http.protocol.HttpContext context)
isAuthenticationRequested in interface org.apache.http.client.AuthenticationStrategyauthHost - authentication host.response - HTTP response.context - HTTP context.true if user authentication is required,
false otherwise.public Map<String,org.apache.http.Header> getChallenges(org.apache.http.HttpHost authhost, org.apache.http.HttpResponse response, org.apache.http.protocol.HttpContext context) throws org.apache.http.auth.MalformedChallengeException
getChallenges in interface org.apache.http.client.AuthenticationStrategyorg.apache.http.auth.MalformedChallengeExceptionpublic Queue<org.apache.http.auth.AuthOption> select(Map<String,org.apache.http.Header> challengeHeaders, org.apache.http.HttpHost authhost, org.apache.http.HttpResponse response, org.apache.http.protocol.HttpContext context)
select in interface org.apache.http.client.AuthenticationStrategypublic void authSucceeded(org.apache.http.HttpHost authhost,
org.apache.http.auth.AuthScheme authScheme,
org.apache.http.protocol.HttpContext context)
authSucceeded in interface org.apache.http.client.AuthenticationStrategypublic void authFailed(org.apache.http.HttpHost authhost,
org.apache.http.auth.AuthScheme authScheme,
org.apache.http.protocol.HttpContext context)
authFailed in interface org.apache.http.client.AuthenticationStrategyCopyright © 2015–2020 Joyent. All rights reserved.