public class MetadataAuthorizationHeader extends java.lang.Object implements HttpURLConnectionAuthenticator
HttpConstants.AUTHORIZATION
header from metadata.In the adapter configuration file this class is aliased as http-metadata-authorization-header which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
MetadataAuthorizationHeader() |
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 |
getMetadataKey() |
void |
setMetadataKey(java.lang.String metadataKey)
The metadata key to retrieve the value for the Authorization header from
|
void |
setup(java.lang.String target,
AdaptrisMessage msg,
ResourceTargetMatcher auth)
Initialize the HttpAuthenticator for a message and return.
|
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
public java.lang.String getMetadataKey()
public void setMetadataKey(java.lang.String metadataKey)