Class

SoupAuthDomain

Description [src]

abstract class Soup.AuthDomain : GObject.Object {
  parent_instance: GObject
}

Server-side authentication.

A SoupAuthDomain manages authentication for all or part of a SoupServer. To make a server require authentication, first create an appropriate subclass of SoupAuthDomain, and then add it to the server with soup_server_add_auth_domain().

In order for an auth domain to have any effect, you must add one or more paths to it (via soup_auth_domain_add_path()). To require authentication for all ordinary requests, add the path "/". (Note that this does not include the special "*" URI (eg, “OPTIONS *”), which must be added as a separate path if you want to cover it.)

If you need greater control over which requests should and shouldn’t be authenticated, add paths covering everything you might want authenticated, and then use a filter (soup_auth_domain_set_filter() to bypass authentication for those requests that don’t need it.

Ancestors

Instance methods

soup_auth_domain_accepts

Checks if msg contains appropriate authorization for domain to accept it.

soup_auth_domain_add_path

Adds path to domain.

soup_auth_domain_challenge

Adds a “WWW-Authenticate” or “Proxy-Authenticate” header to msg.

soup_auth_domain_check_password

Checks if msg authenticates to domain via username and password.

soup_auth_domain_covers

Checks if domain requires msg to be authenticated (according to its paths and filter function).

soup_auth_domain_get_realm

Gets the realm name associated with domain.

soup_auth_domain_remove_path

Removes path from domain.

soup_auth_domain_set_filter

Adds filter as an authentication filter to domain.

soup_auth_domain_set_generic_auth_callback

Sets auth_callback as an authentication-handling callback for domain.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

Soup.AuthDomain:filter

The SoupAuthDomainFilter for the domain.

Soup.AuthDomain:filter-data

Data to pass to the SoupAuthDomainFilter.

Soup.AuthDomain:generic-auth-callback

The SoupAuthDomainGenericAuthCallback.

Soup.AuthDomain:generic-auth-data

The data to pass to the SoupAuthDomainGenericAuthCallback.

Soup.AuthDomain:proxy

Whether or not this is a proxy auth domain.

Soup.AuthDomain:realm

The realm of this auth domain.

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct SoupAuthDomainClass {
  GObjectClass parent_class;
  char* (* accepts) (
    SoupAuthDomain* domain,
    SoupServerMessage* msg,
    const char* header
  );
  char* (* challenge) (
    SoupAuthDomain* domain,
    SoupServerMessage* msg
  );
  gboolean (* check_password) (
    SoupAuthDomain* domain,
    SoupServerMessage* msg,
    const char* username,
    const char* password
  );
  None padding;
  
}
No description available.
Class members
parent_class: GObjectClass
No description available.
accepts: char* (* accepts) ( SoupAuthDomain* domain, SoupServerMessage* msg, const char* header )
No description available.
challenge: char* (* challenge) ( SoupAuthDomain* domain, SoupServerMessage* msg )
No description available.
check_password: gboolean (* check_password) ( SoupAuthDomain* domain, SoupServerMessage* msg, const char* username, const char* password )
No description available.
padding: None
No description available.

Virtual methods

Soup.AuthDomainClass.accepts
No description available.

Soup.AuthDomainClass.challenge

Adds a “WWW-Authenticate” or “Proxy-Authenticate” header to msg.

Soup.AuthDomainClass.check_password

Checks if msg authenticates to domain via username and password.