Qore HttpServerUtil Module Reference 1.3
Loading...
Searching...
No Matches
HttpServer::PermissiveAuthenticator Class Reference

class providing automatic authentication for all requests More...

#include <HttpServerUtil.qm.dox.h>

Inheritance diagram for HttpServer::PermissiveAuthenticator:
[legend]

Public Member Methods

*hash< HttpResponseInfoauthenticateRequest (HttpListenerInterface listener, hash< auto > hdr, reference< hash > cx)
 primary method called to authenticate each request
 
- Public Member Methods inherited from HttpServer::AbstractAuthenticator
 authenticate (reference< hash< auto > > cx, string user, string pass='')
 called to authenticate a user for a connection
 
deprecated authenticate (string user, string pass='')
 called to authenticate a user for a connection
 
 authenticateByIP (reference< hash< auto > > cx, string ip, reference< bool > authenticated)
 Called to try to authenticate the connection based on the source IP address.
 
deprecated 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
 
*hash< HttpResponseInfoauthenticateRequest (HttpListenerInterface listener, hash< auto > hdr, reference< hash< auto > > cx)
 Primary method called to authenticate each request.
 
hash< HttpResponseInfodo401 (string msg='Authentication is required to access this server', *hash< auto > cx)
 returns a 401 response with the given string argument as the message body
 
 endRequest ()
 Called after a request has been handled to allow the authenticator to remove any thread-local auth information.
 
hash< auto > getAuthHeader ()
 returns a hash with one item - WWW-Authenticate header set to correct realm
 
hash< auto > getAuthHeader (hash< auto > cx)
 returns a hash with one item - WWW-Authenticate header set to correct realm
 
string getRealm ()
 returns the authentication realm as a string
 
bool requiresAuthentication ()
 called to check if the connection requires authentication
 

Additional Inherited Members

- Private Member Methods inherited from HttpServer::AbstractAuthenticator
*hash< HttpResponseInfoauthenticateRequestIntern (HttpListenerInterface listener, hash< auto > hdr, reference< hash< auto > > cx, reference< bool > authenticated)
 Primary method called to authenticate each request.
 

Detailed Description

class providing automatic authentication for all requests

Member Function Documentation

◆ authenticateRequest()

*hash< HttpResponseInfo > HttpServer::PermissiveAuthenticator::authenticateRequest ( HttpListenerInterface  listener,
hash< auto >  hdr,
reference< hash >  cx 
)

primary method called to authenticate each request

Parameters
listeneran HttpListenerInterface object for the listener serving the request for logging purposes
hdra hash of request headers
cxa reference to the call context hash; set the "user" key to the user name if a user was identified and authorized; see HttpServerUtil Request Context for information about this value
Returns
returns NOTHING indicating that the request is authenticated