### Class

# Soup AuthDomain

since: 3.0

#### Description [src]

    abstract class Soup.AuthDomain : GObject.Object
    {
      /* No available fields */
    }

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.

Available since: 3.0

#### Ancestors

- GObject

#### Descendants

- SoupAuthDomainBasic
- SoupAuthDomainDigest

#### Instance methods

###### soup_auth_domain_accepts

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

since: 3.0

###### soup_auth_domain_add_path

Adds `path` to `domain`.

since: 3.0

###### soup_auth_domain_challenge

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

since: 3.0

###### soup_auth_domain_check_password

Checks if `msg` authenticates to `domain` via `username` and `password`.

since: 3.0

###### soup_auth_domain_covers

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

since: 3.0

###### soup_auth_domain_get_realm

Gets the realm name associated with `domain`.

since: 3.0

###### soup_auth_domain_remove_path

Removes `path` from `domain`.

since: 3.0

###### soup_auth_domain_set_filter

Adds `filter` as an authentication filter to `domain`.

since: 3.0

###### soup_auth_domain_set_generic_auth_callback

Sets `auth_callback` as an authentication-handling callback for `domain`.

since: 3.0

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### Soup.AuthDomain:filter

The `SoupAuthDomainFilter` for the domain.

since: 3.0

###### Soup.AuthDomain:filter-data

Data to pass to the `SoupAuthDomainFilter`.

since: 3.0

###### Soup.AuthDomain:generic-auth-callback

The `SoupAuthDomainGenericAuthCallback`.

since: 3.0

###### Soup.AuthDomain:generic-auth-data

The data to pass to the `SoupAuthDomainGenericAuthCallback`.

since: 3.0

###### Soup.AuthDomain:proxy

Whether or not this is a proxy auth domain.

since: 3.0

###### Soup.AuthDomain:realm

The realm of this auth domain.

since: 3.0

#### 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.

since: 2.0

#### 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.

since: 3.0

###### Soup.AuthDomainClass.challenge

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

since: 3.0

###### Soup.AuthDomainClass.check_password

Checks if `msg` authenticates to `domain` via `username` and `password`.

since: 3.0