Package esendex.sdk.java.service.auth
Class AbstractAuthenticator
java.lang.Object
esendex.sdk.java.service.auth.AbstractAuthenticator
- All Implemented Interfaces:
Authenticator
- Direct Known Subclasses:
BasicAuthenticator
,SessionAuthenticator
An AbstractAuthenticator is a base class for Authenticators.
It provides encryption facility and writes out the header.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
createHeader
(URLConnection urlCon) Creates the header.protected String
encode()
Encode the credentials.boolean
abstract String
Gets the non encoded credentials.protected String
Gets the scheme which is BASIC.protected UserPassword
int
hashCode()
-
Constructor Details
-
AbstractAuthenticator
-
-
Method Details
-
getUserPassword
-
getScheme
Gets the scheme which is BASIC.- Returns:
- the scheme
-
encode
Encode the credentials.- Returns:
- encoded credentials
-
getCredentials
Gets the non encoded credentials.- Returns:
- the credentials
-
createHeader
Creates the header.- Specified by:
createHeader
in interfaceAuthenticator
- Parameters:
urlCon
- the url con the URLConnection
-
equals
-
hashCode
public int hashCode()
-