com.apamax.authentication
Event HTTPBasic
Read and create HTTP basic headers.
| Import summary |
AuthenticationPlugin | plugin
private |
plugin
AuthenticationPlugin plugin
private
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.