Package com.adaptris.core.http.auth
Interface HttpAuthenticator
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
HttpURLConnectionAuthenticator
- All Known Implementing Classes:
ConfiguredAuthorizationHeader,ConfiguredUsernamePassword,DynamicBasicAuthorizationHeader,MetadataAuthorizationHeader,MetadataUsernamePassword,NoAuthentication,UserPassAuthentication
HttpAuthenticator is an interface designed to facilitate HttpAuthentication in various ways.
Some implementations of this interface will need to temporarily mutate global state and therefore must be closed in a finally statement or try-with-resources block.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Undo whatever global state modifications have been made by this HttpAuthenticator.voidsetup(String target, AdaptrisMessage msg, ResourceTargetMatcher auth) Initialize the HttpAuthenticator for a message and return.
-
Method Details
-
setup
Initialize the HttpAuthenticator for a message and return. Any global state mutations should be done here.- Parameters:
target- The URL to set authenticate formsg- The message to set up forauth- theResourceTargetMatcherto use, if null a default one will be created based on theResourceAuthenticator.ResourceTarget.getRequestingURL()- Throws:
CoreException
-
close
void close()Undo whatever global state modifications have been made by this HttpAuthenticator.- Specified by:
closein interfaceAutoCloseable
-