Qorus Integration Engine®
4.0.3.p2_git
|
class for authenticating with standard Qorus RBAC authentication that returns a header that asks for basic authentication when authentication fails More...
Public Member Methods | |
*hash< HttpResponseInfo > | authenticateRequest (HttpListenerInterface listener, hash< auto > hdr, reference< hash > cx) |
primary method called to authenticate each request More... | |
private hash< auto > | getAuthHeader () |
can be overridden to return a header with 401 Unauthorized responses More... | |
Additional Inherited Members | |
Private:Internal Member Methods inherited from OMQ::DefaultQorusRBACAuthenticator | |
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 that returns a header that asks for basic authentication when authentication fails
The difference between this class and OMQ::DefaultQorusRBACAuthenticator is only in the response to authentication failures; this class returns a header that tells a browser that basic authentication is required, so the requesting browser will display a dialog box with the username and password.
Qorus supports token-based authentication as well as pluggable user-defined authentication as well, so HTTP basic authentication is not the only authentication mechanism supported.
*hash<HttpResponseInfo> OMQ::DefaultQorusRBACBasicAuthenticator::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.
WWW-Authenticate
header is returned for 401
responses using the getAuthHeader() methodprivate hash<auto> OMQ::DefaultQorusRBACBasicAuthenticator::getAuthHeader | ( | ) |
can be overridden to return a header with 401 Unauthorized
responses
WWW-Authenticate
header requesting basic authentication with the realm as returned by the getRealm() method