Qorus Integration Engine®
4.0.3.p2_git
|
class for authenticating with standard Qorus RBAC authentication More...
Public Member Methods | |
bool | requiresAuthentication () |
called to check if the connection requires authentication More... | |
string | getRealm () |
returns the authentication realm as a string More... | |
*hash< HttpResponseInfo > | authenticateRequest (HttpListenerInterface listener, hash< auto > hdr, reference< hash > cx) |
primary method called to authenticate each request More... | |
authenticate (string user, string pass="") | |
called to authenticate a user for a connection More... | |
authenticateByIP (string ip, reference< string > user) | |
called when the connection requires authentication, but no authentication credentials were supplied, to try to authenticate the connection based on the source IP address More... | |
private hash< auto > | getAuthHeader () |
can be overridden to return a header with 401 Unauthorized responses More... | |
class for authenticating with standard Qorus RBAC authentication
called to authenticate a user for a connection
This method will only be called if requiresAuthentication() returns True
user | the username to authenticate |
pass | the password for the user |
AUTHENTICATION-ERROR | the user cannot be authenticated |
called when the connection requires authentication, but no authentication credentials were supplied, to try to authenticate the connection based on the source IP address
This method will only be called if requiresAuthentication() returns True and no authentication credentials are supplied with the request
ip | the IP address of the source connection |
user | a reference to a string that will be populated with the username to use if the request can be authenticated based on the source IP address |
AUTHENTICATION-ERROR | the user cannot be authenticated |
*hash<HttpResponseInfo> OMQ::DefaultQorusRBACAuthenticator::authenticateRequest | ( | HttpListenerInterface | listener, |
hash< auto > | hdr, | ||
reference< hash > | cx | ||
) |
primary method called to authenticate each request
listener | an HttpListenerInterface object for the listener serving the request for logging purposes |
hdr | a hash of request headers |
cx | a reference to the call context hash; set the "user" key to the user name if a user was identified and authorized; this hash will have the following keys:
|
"code"
: the HTTP response code"body"
: the error message body"hdr"
: an optional hash of headers for the error responseAuthentication is performed according to Qorus system configuration.
private hash<auto> OMQ::DefaultQorusRBACAuthenticator::getAuthHeader | ( | ) |
can be overridden to return a header with 401 Unauthorized
responses
For example to return a header that tells the caller to require basic authentication (which will cause web browsers to show a dialog box asking for a username and password before repeating the request); use the following:
string OMQ::DefaultQorusRBACAuthenticator::getRealm | ( | ) |
returns the authentication realm as a string
"Qorus Integration Engine"
bool OMQ::DefaultQorusRBACAuthenticator::requiresAuthentication | ( | ) |
called to check if the connection requires authentication