public class ConfiguredAuthorizationHeader extends java.lang.Object implements HttpURLConnectionAuthenticator
HttpConstants.AUTHORIZATION
header from static data.In the adapter configuration file this class is aliased as http-configured-authorization-header which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
ConfiguredAuthorizationHeader() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Undo whatever global state modifications have been made by this HttpAuthenticator.
|
void |
configureConnection(java.net.HttpURLConnection conn)
Perform whatever actions are required to the HttpURLConnection after it's been opened (setting custom headers, etc).
|
java.lang.String |
getHeaderValue() |
void |
setHeaderValue(java.lang.String headerValue)
The value for the authorization header
|
void |
setup(java.lang.String target,
AdaptrisMessage msg,
ResourceTargetMatcher auth)
Initialize the HttpAuthenticator for a message and return.
|
public java.lang.String getHeaderValue()
public void setHeaderValue(java.lang.String headerValue)
headerValue
- the header value, supports metadata resolution via InterlokMessage.resolve(String)
.public void setup(java.lang.String target, AdaptrisMessage msg, ResourceTargetMatcher auth) throws CoreException
HttpAuthenticator
setup
in interface HttpAuthenticator
target
- The URL to set authenticate formsg
- The message to set up forauth
- the ResourceTargetMatcher
to use, if null a default one will be created based on the
ResourceAuthenticator.ResourceTarget.getRequestingURL()
CoreException
public void configureConnection(java.net.HttpURLConnection conn)
HttpURLConnectionAuthenticator
configureConnection
in interface HttpURLConnectionAuthenticator
public void close()
HttpAuthenticator
close
in interface HttpAuthenticator
close
in interface java.lang.AutoCloseable