AuthManager

#SoupAuthManager is the #SoupSessionFeature that handles HTTP authentication for a #SoupSession.

A #SoupAuthManager 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 soup_session_remove_feature_by_type(), or disable it on individual requests with soup_message_disable_feature().

Constructors

this
this(SoupAuthManager* soupAuthManager, bool ownedRef)

Sets our main struct and passes it to the parent class.

Members

Functions

addOnAuthenticate
gulong addOnAuthenticate(void delegate(Message, Auth, bool, AuthManager) dlg, ConnectFlags connectFlags)

Emitted when the manager requires the application to provide authentication credentials.

clearCachedCredentials
void clearCachedCredentials()

Clear all credentials cached by @manager

getAuthManagerStruct
SoupAuthManager* getAuthManagerStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

useAuth
void useAuth(URI uri, Auth auth)

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" @manager'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.

Mixins

__anonymous
mixin SessionFeatureT!(SoupAuthManager)
Undocumented in source.

Static functions

getType
GType getType()

Variables

soupAuthManager
SoupAuthManager* soupAuthManager;

the main Gtk struct

Inherited Members

From SessionFeatureIF

getSessionFeatureStruct
SoupSessionFeature* getSessionFeatureStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
addFeature
bool addFeature(GType type)

Adds a "sub-feature" of type @type to the base feature @feature. This is used for features that can be extended with multiple different types. Eg, the authentication manager can be extended with subtypes of #SoupAuth.

attach
void attach(Session session)
detach
void detach(Session session)
hasFeature
bool hasFeature(GType type)

Tests if @feature has a "sub-feature" of type @type. See soup_session_feature_add_feature().

removeFeature
bool removeFeature(GType type)

Removes the "sub-feature" of type @type from the base feature @feature. See soup_session_feature_add_feature().

Meta

Since

2.42