soup.auth

Module for [Auth] class

Types 3

The abstract base class for handling authentication.

Specific HTTP Authentication mechanisms are implemented by its subclasses, but applications never need to be aware of the specific subclasses being used.

#SoupAuth objects store the authentication data associated with a given bit of web space. They are created automatically by class@Session.

Methods
GType _gType() @property
Auth self()Returns `this`, for use in `with` statements.
AuthGidBuilder builder()Get builder for [soup.auth.Auth] Returns: New builder object
string authority() @propertyGet `authority` property. Returns: The authority (host:port) being authenticated to.
void authority(string propval) @propertySet `authority` property. Params: propval = The authority (host:port) being authenticated to.
string realm() @propertyGet `realm` property. Returns: The authentication realm.
void realm(string propval) @propertySet `realm` property. Params: propval = The authentication realm.
string schemeName() @propertyGet `schemeName` property. Returns: The authentication scheme name.
void authenticate(string username, string password)Call this on an auth to authenticate it.
bool canAuthenticate()Tests if auth is able to authenticate by providing credentials to the [soup.auth.Auth.authenticate]. Returns: true if auth is able to accept credentials.
void cancel()Call this on an auth to cancel it.
string getAuthority()Returns the authority (host:port) that auth is associated with. Returns: the authority
string getAuthorization(soup.message.Message msg)Generates an appropriate "Authorization" header for msg.
string getInfo()Gets an opaque identifier for auth.
string[] getProtectionSpace(glib.uri.Uri sourceUri)Returns a list of paths on the server which auth extends over.
string getRealm()Returns auth's realm.
string getSchemeName()soupauthgetschemename: (attributes org.gtk.Method.get_property=scheme-name) Returns auth's scheme name. (Eg, "Basic", "Digest", or "NTLM") Returns: the scheme name
bool isAuthenticated()Tests if auth has been given a username and password. Returns: true if auth has been given a username and password
bool isCancelled()Tests if auth has been cancelled Returns: true if auth has been cancelled
bool isForProxy()Tests whether or not auth is associated with a proxy server rather than an "origin" server. Returns: true or false
bool isReady(soup.message.Message msg)Tests if auth is ready to make a request for msg with.
bool update(soup.message.Message msg, string authHeader)Updates auth with the information from msg and auth_header, possibly un-authenticating it.
Constructors
this(void * ptr, Flag!"Take" take)
this(gobject.types.GType type, soup.message.Message msg, string authHeader)Creates a new #SoupAuth of type type with the information from msg and auth_header.
Methods
T authority(string propval)Set `authority` property. Params: propval = The authority (host:port) being authenticated to. Returns: Builder instance for fluent chaining
T realm(string propval)Set `realm` property. Params: propval = The authentication realm. Returns: Builder instance for fluent chaining

Fluent builder for [soup.auth.Auth]

Methods