com.apamax.authentication
Event HTTPBasic


Read and create HTTP basic headers.
Import summary
 AuthenticationPluginplugin

private
 
Action summary
 voidaddAuthHeader(com.softwareag.connectivity.httpclient.Request req)

Adds an Authorization header to the given request.
 com.apamax.authentication.HTTPBasicstatic createFromAuth(string auth)

Create an HTTPBasic object from an Authorization header.
 com.apamax.authentication.HTTPBasicstatic createFromCreds(string username, string password)

Create an HTTPBasic object from a username and password.
 stringgetAuthHeader()

Returns an Authorization header for these credentials. (eg "Basic mXwvknIEinIne=").
 stringgetPassword()

Returns the password for these credentials.
 stringgetUser()

Returns the username for these credentials.
 
Import detail

plugin

AuthenticationPlugin plugin
private
Action detail

addAuthHeader

void addAuthHeader(com.softwareag.connectivity.httpclient.Request req)
Adds an Authorization header to the given request.
Parameters:
req - The request to add the header to.

createFromAuth

com.apamax.authentication.HTTPBasic static createFromAuth(string auth)
Create an HTTPBasic object from an Authorization header.
Parameters:
auth - A correctly formatted Authorization header (eg "Basic mXwvknIEinIne=").
Returns:
A new HTTPBasic object representing the encapsulated authentication data.
Throws:
IllegalArgumentException if auth is not a properly formatted header.

createFromCreds

com.apamax.authentication.HTTPBasic static createFromCreds(string username, string password)
Create an HTTPBasic object from a username and password.
Parameters:
username
password
Returns:
A new HTTPBasic object representing the given authentication data.

getAuthHeader

string getAuthHeader()
Returns an Authorization header for these credentials. (eg "Basic mXwvknIEinIne=").

getPassword

string getPassword()
Returns the password for these credentials.

getUser

string getUser()
Returns the username for these credentials.