Soup.AuthManager¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Soup.AuthManager(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
HTTP client-side authentication handler.
Soup.AuthManager
is the [iface`SessionFeature`] that handles HTTP authentication for a [class`Session`].A
Soup.AuthManager
is added to the session by default, and normally you don’t need to worry about it at all. However, if you want to disable HTTP authentication, you can remove the feature from the session with [method`Session`.remove_feature_by_type] or disable it on individual requests with [method`Message`.disable_feature].You can use this with [method`Session`.remove_feature_by_type] or [method`Message`.disable_feature].
(Although this type has only been publicly visible since libsoup 2.42, it has always existed in the background, and you can use
g_type_from_name ("SoupAuthManager")
to get its [alias`GLib`.Type] in earlier releases.)- clear_cached_credentials()¶
Clear all credentials cached by self.
- use_auth(uri, auth)¶
- Parameters:
Records that auth is to be used under uri, as though a WWW-Authenticate header had been received at that URI.
This can be used to “preload” self's auth cache, to avoid an extra HTTP round trip in the case where you know ahead of time that a 401 response will be returned.
This is only useful for authentication types where the initial Authorization header does not depend on any additional information from the server. (Eg, Basic or NTLM, but not Digest.)