-
public virtual string accepts (Message msg, string header)
Checks if msg contains appropriate authorization for domain to accept it.
Mirroring covers, this does not check whether or not domain
cares if msg is authorized.
-
public void add_path (string path)
Adds path to domain, such that requests under path on
domain's server will require authentication (unless overridden by
remove_path or
set_filter).
-
public virtual string challenge (Message msg)
Adds a "WWW-Authenticate" or "Proxy-Authenticate" header to msg, requesting that the
client authenticate, and sets msg's status accordingly.
-
public virtual bool check_password (Message msg, string username, string password)
-
public bool covers (Message msg)
Checks if domain requires msg to be authenticated (according to its paths
and filter function). This does not actually look at whether msg is authenticated, merely whether or not
it needs to be.
-
public unowned string get_realm ()
Gets the realm name associated with domain
-
public void remove_path (string path)
Removes path from domain, such that requests under path on
domain's server will NOT require authentication.
-
public void set_filter (owned AuthDomainFilter filter)
Adds filter as an authentication filter to domain. The filter gets a chance
to bypass authentication for certain requests that would otherwise require it. Eg, it might check the message's path in some way
that is too complicated to do via the other methods, or it might check the message's method, and allow GETs but not PUTs.
-
public void set_generic_auth_callback (owned AuthDomainGenericAuthCallback auth_callback)
Sets auth_callback as an authentication-handling callback for domain.
Whenever a request comes in to domain which cannot be authenticated via a domain-specific auth callback (eg,
AuthDomainDigestAuthCallback), the generic auth callback will
be invoked. See AuthDomainGenericAuthCallback for information
on what the callback should do.
-
public bool try_generic_auth_callback (Message msg, string username)