Package com.adaptris.core.http.auth
Class UserPassAuthentication
- java.lang.Object
-
- com.adaptris.core.http.auth.UserPassAuthentication
-
- All Implemented Interfaces:
HttpAuthenticator
,java.lang.AutoCloseable
- Direct Known Subclasses:
ConfiguredUsernamePassword
,MetadataUsernamePassword
public abstract class UserPassAuthentication extends java.lang.Object implements HttpAuthenticator
-
-
Constructor Summary
Constructors Constructor Description UserPassAuthentication()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
Undo whatever global state modifications have been made by this HttpAuthenticator.protected static char[]
decodePassword(java.lang.String pw)
protected abstract java.net.PasswordAuthentication
getPasswordAuthentication(AdaptrisMessage msg)
void
setup(java.lang.String target, AdaptrisMessage msg, ResourceTargetMatcher matcher)
Initialize the HttpAuthenticator for a message and return.
-
-
-
Method Detail
-
setup
public void setup(java.lang.String target, AdaptrisMessage msg, ResourceTargetMatcher matcher) throws CoreException
Description copied from interface:HttpAuthenticator
Initialize the HttpAuthenticator for a message and return. Any global state mutations should be done here.- Specified by:
setup
in interfaceHttpAuthenticator
- Parameters:
target
- The URL to set authenticate formsg
- The message to set up formatcher
- theResourceTargetMatcher
to use, if null a default one will be created based on theResourceAuthenticator.ResourceTarget.getRequestingURL()
- Throws:
CoreException
-
getPasswordAuthentication
protected abstract java.net.PasswordAuthentication getPasswordAuthentication(AdaptrisMessage msg) throws CoreException
- Throws:
CoreException
-
close
public void close()
Description copied from interface:HttpAuthenticator
Undo whatever global state modifications have been made by this HttpAuthenticator.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceHttpAuthenticator
-
decodePassword
protected static char[] decodePassword(java.lang.String pw) throws CoreException
- Throws:
CoreException
-
-