Package esendex.sdk.java.service.auth
Class SessionAuthenticator
java.lang.Object
esendex.sdk.java.service.auth.AbstractAuthenticator
esendex.sdk.java.service.auth.SessionAuthenticator
- All Implemented Interfaces:
Authenticator
A (RFC2617) Basic authenticator that writes out the Http header to
authenticate a request.
In contrast to the BasicAuthenticator, the UserPassword credentials are
written out (in Base64) in an initial request to the SessionResource.
In return a session id is returned and subsequent requests to
other resources use this as a credential, Base64 encoded.
- Author:
- Mike Whittaker
-
Constructor Summary
ConstructorsConstructorDescriptionSessionAuthenticator
(UserPassword userPassword) Create an authenticator for session authentication. -
Method Summary
Methods inherited from class esendex.sdk.java.service.auth.AbstractAuthenticator
createHeader, encode, equals, getScheme, getUserPassword, hashCode
-
Constructor Details
-
SessionAuthenticator
Create an authenticator for session authentication.- Parameters:
userPassword
- the user password- Throws:
EsendexException
- the esendex exception
-
-
Method Details
-
getCredentials
Gets the credentials.- Specified by:
getCredentials
in classAbstractAuthenticator
- Returns:
- the credentials the credentials
-