soup.auth
Module for [Auth] class
Types 3
classAuth : gobject.object.ObjectWrap
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
AuthGidBuilder builder()Get builder for [soup.auth.Auth] Returns: New builder objectstring 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.void realm(string propval) @propertySet `realm` property. Params: propval = The authentication realm.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 authoritystring 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 namebool isAuthenticated()Tests if auth has been given a username and password. Returns: true if auth has been given a username and passwordbool isCancelled()Tests if auth has been cancelled Returns: true if auth has been cancelledbool isForProxy()Tests whether or not auth is associated with a proxy server rather than an "origin" server. Returns: true or falsebool 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(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 chainingT realm(string propval)Set `realm` property. Params: propval = The authentication realm. Returns: Builder instance for fluent chaining