Auth
Object Hierarchy:
Description:
public abstract class Auth :
Object
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.
Namespace: Soup
Package: libsoup-2.4
Content:
Properties:
Creation methods:
-
public Auth (Type type, Message msg, string auth_header)
Creates a new Auth of type type with
the information from msg and auth_header.
Methods:
-
public virtual void authenticate (string username, string password)
Call this on an auth to authenticate it; normally this will cause the auth's message to be requeued with
the new authentication info.
-
public virtual string get_authorization (Message msg)
Generates an appropriate "Authorization" header for msg. (The session will only call this
if soup_auth_is_authenticated returned true.)
-
public unowned string get_host ()
Returns the host that auth is associated with.
-
public string get_info ()
Gets an opaque identifier for auth, for use as a hash key or the like.
Auth objects from the same server with the same identifier refer to the same
authentication domain (eg, the URLs associated with them take the same usernames and passwords).
-
public virtual SList<string> get_protection_space (URI source_uri)
Returns a list of paths on the server which auth extends over. (All subdirectories of these
paths are also assumed to be part of auth's protection space, unless otherwise discovered not to be.)
-
public unowned string get_realm ()
Returns auth's realm. This is an identifier that distinguishes separate authentication
spaces on a given server, and may be some string that is meaningful to the user. (Although it is probably not localized.)
-
public unowned string get_scheme_name ()
Returns auth's scheme name. (Eg, "Basic", "Digest", or "NTLM")
-
public virtual bool update (Message msg, HashTable<void*,void*> auth_params)
Updates auth with the information from msg and auth_header,
possibly un-authenticating it. As with Auth, this is normally only used by
Session.
Signals:
-
public void save_password (string object, string p0)
Emitted to request that the username/@password pair be saved. If the session supports
password-saving, it will connect to this signal before emitting authenticate
, so that it record the password if requested by the caller.