Qore HttpServer Module Reference
0.3.6
|
abstract base class for external authentication More...
Public Member Functions | |
bool | requiresAuthentication () |
called to check if the connection requires authentication | |
string | getRealm () |
returns the authentication realm as a string | |
list | authenticate (string user, string pass="") |
called to authenticate a user for a connection; should return a list of roles for the user if the user is authenticated | |
list | authenticateByIP (string ip, reference 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 | |
abstract base class for external authentication
This class should be inherited by a class providing real authentication
called to authenticate a user for a connection; should return a list of roles for the user if the user is authenticated
This method will only be called if requiresAuthentication() returns True
user | the username to authenticate |
pass | the password for the user |
AUTHENTICATION-ERROR | subclasses should throw this exception if the user cannot be authenticated (however this method will never throw any exceptions) |
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 (this method returns the string "admin" ) |
AUTHENTICATION-ERROR | subclasses should throw this exception if the user cannot be authenticated (however this base class method as implemented here will never throw any exceptions but instead just returns an empty list by default) |
string HttpServer::AbstractAuthenticator::getRealm | ( | ) |
returns the authentication realm as a string
"Default Authentication Realm"
)