Qorus Integration Engine® Enterprise Edition 6.0.15_prod
|
class for authenticating with standard Qorus RBAC authentication based on a cookie More...
Public Member Methods | |
constructor (string cookie=DefaultCookie, *string redirect_url) | |
Creates the object with the argument giving the cookie name to use for authentication. More... | |
*hash< HttpResponseInfo > | authenticateRequest (HttpListenerInterface listener, hash< auto > hdr, reference< hash > cx) |
primary method called to authenticate each request More... | |
Public Attributes | |
const | DefaultCookie = "qorus_auth_token" |
The default cookie name. | |
Private Attributes | |
string | cookie |
The cookie name to use for authentication. | |
*string | redirect_url |
The URL to redirect unauthenticated requests to. | |
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... | |
hash< auto > | getAuthHeader (*hash< auto > cx) |
can be overridden to return a header with 401 Unauthorized responses More... | |
class for authenticating with standard Qorus RBAC authentication based on a cookie
The cookie must contain a valid authentication token
If the cookie is not present or does not hold a valid token, standard authentication is attempted.
If standard authentication also fails, and a redirect URL is set in the constructor, then requests are redirected to the given URL.
*hash< HttpResponseInfo > OMQ::QorusCookieAuthenticator::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 first attempted with the given cookie, if present in the header. If not, then DefaultQorusRBACAuthenticator::authenticateRequest() is called.
OMQ::QorusCookieAuthenticator::constructor | ( | string | cookie = DefaultCookie , |
*string | redirect_url | ||
) |
Creates the object with the argument giving the cookie name to use for authentication.
cookie | the cookie to check for an authentication token |
redirect_url | the URL to redirect unauthenticated requests to |