Auth

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

Constructors

this
this(SoupAuth* soupAuth, bool ownedRef)

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

this
this(GType type, Message msg, string authHeader)

Creates a new #SoupAuth of type @type with the information from @msg and @auth_header.

Members

Functions

authenticate
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.

canAuthenticate
bool canAuthenticate()

Tests if @auth is able to authenticate by providing credentials to the soup_auth_authenticate().

freeProtectionSpace
void freeProtectionSpace(ListSG space)

Frees @space.

getAuthStruct
SoupAuth* getAuthStruct(bool transferOwnership)

Get the main Gtk struct

getAuthorization
string getAuthorization(Message msg)

Generates an appropriate "Authorization" header for @msg. (The session will only call this if soup_auth_is_authenticated() returned %TRUE.)

getHost
string getHost()

Returns the host that @auth is associated with.

getInfo
string getInfo()

Gets an opaque identifier for @auth, for use as a hash key or the like. #SoupAuth 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).

getProtectionSpace
ListSG getProtectionSpace(URI sourceUri)

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.)

getRealm
string getRealm()

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.)

getSavedPassword
string getSavedPassword(string user)
getSavedUsers
ListSG getSavedUsers()
getSchemeName
string getSchemeName()

Returns @auth's scheme name. (Eg, "Basic", "Digest", or "NTLM")

getStruct
void* getStruct()

the main Gtk struct as a void*

hasSavedPassword
void hasSavedPassword(string username, string password)
isAuthenticated
bool isAuthenticated()

Tests if @auth has been given a username and password

isForProxy
bool isForProxy()

Tests whether or not @auth is associated with a proxy server rather than an "origin" server.

isReady
bool isReady(Message msg)

Tests if @auth is ready to make a request for @msg with. For most auths, this is equivalent to soup_auth_is_authenticated(), but for some auth types (eg, NTLM), the auth may be sendable (eg, as an authentication request) even before it is authenticated.

savePassword
void savePassword(string username, string password)
update
bool update(Message msg, string authHeader)

Updates @auth with the information from @msg and @auth_header, possibly un-authenticating it. As with soup_auth_new(), this is normally only used by #SoupSession.

Static functions

getType
GType getType()

Variables

soupAuth
SoupAuth* soupAuth;

the main Gtk struct

Meta