AuthDomainBasic

#SoupAuthDomainBasic handles the server side of HTTP "Basic" (ie, cleartext password) authentication.

Constructors

this
this(SoupAuthDomainBasic* soupAuthDomainBasic, bool ownedRef)

Sets our main struct and passes it to the parent class.

Members

Functions

getAuthDomainBasicStruct
SoupAuthDomainBasic* getAuthDomainBasicStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

setAuthCallback
void setAuthCallback(SoupAuthDomainBasicAuthCallback callback, void* userData, GDestroyNotify dnotify)

Sets the callback that @domain will use to authenticate incoming requests. For each request containing authorization, @domain will invoke the callback, and then either accept or reject the request based on @callback's return value.

Static functions

getType
GType getType()

Variables

soupAuthDomainBasic
SoupAuthDomainBasic* soupAuthDomainBasic;

the main Gtk struct

Inherited Members

From AuthDomain

soupAuthDomain
SoupAuthDomain* soupAuthDomain;

the main Gtk struct

getAuthDomainStruct
SoupAuthDomain* getAuthDomainStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
accepts
string accepts(Message msg)

Checks if @msg contains appropriate authorization for @domain to accept it. Mirroring soup_auth_domain_covers(), this does not check whether or not @domain <emphasis>cares</emphasis> if @msg is authorized.

addPath
void addPath(string path)

Adds @path to @domain, such that requests under @path on @domain's server will require authentication (unless overridden by soup_auth_domain_remove_path() or soup_auth_domain_set_filter()).

challenge
void challenge(Message msg)

Adds a "WWW-Authenticate" or "Proxy-Authenticate" header to @msg, requesting that the client authenticate, and sets @msg's status accordingly.

checkPassword
bool checkPassword(Message msg, string username, string password)

Checks if @msg authenticates to @domain via @username and @password. This would normally be called from a #SoupAuthDomainGenericAuthCallback.

covers
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 <emphasis>is</emphasis> authenticated, merely whether or not it needs to be.

getRealm
string getRealm()

Gets the realm name associated with @domain

removePath
void removePath(string path)

Removes @path from @domain, such that requests under @path on @domain's server will NOT require authentication.

setFilter
void setFilter(SoupAuthDomainFilter filter, void* filterData, GDestroyNotify dnotify)

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.

setGenericAuthCallback
void setGenericAuthCallback(SoupAuthDomainGenericAuthCallback authCallback, void* authData, GDestroyNotify dnotify)

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, #SoupAuthDomainDigestAuthCallback), the generic auth callback will be invoked. See #SoupAuthDomainGenericAuthCallback for information on what the callback should do.

tryGenericAuthCallback
bool tryGenericAuthCallback(Message msg, string username)

Meta