AuthenticationRequest

Whenever a client attempts to load a page protected by HTTP authentication, credentials will need to be provided to authorize access. To allow the client to decide how it wishes to handle authentication, WebKit will fire a #WebKitWebView::authenticate signal with a WebKitAuthenticationRequest object to provide client side authentication support. Credentials are exposed through the #WebKitCredential object.

In case the client application does not wish to handle this signal WebKit will provide a default handler. To handle authentication asynchronously, simply increase the reference count of the WebKitAuthenticationRequest object.

Constructors

this
this(WebKitAuthenticationRequest* webKitAuthenticationRequest, bool ownedRef)

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

Members

Functions

addOnAuthenticated
gulong addOnAuthenticated(void delegate(Credential, AuthenticationRequest) dlg, ConnectFlags connectFlags)

This signal is emitted when the user authentication request succeeded. Applications handling their own credential storage should connect to this signal to save the credentials.

addOnCancelled
gulong addOnCancelled(void delegate(AuthenticationRequest) dlg, ConnectFlags connectFlags)

This signal is emitted when the user authentication request is cancelled. It allows the application to dismiss its authentication dialog in case of page load failure for example.

authenticate
void authenticate(Credential credential)

Authenticate the #WebKitAuthenticationRequest using the #WebKitCredential supplied. To continue without credentials, pass %NULL as @credential.

canSaveCredentials
bool canSaveCredentials()

Determine whether the authentication method associated with this #WebKitAuthenticationRequest should allow the storage of credentials. This will return %FALSE if WebKit doesn't support credential storing, if private browsing is enabled, or if persistent credential storage has been disabled in #WebKitWebsiteDataManager, unless credentials saving has been explicitly enabled with webkit_authentication_request_set_can_save_credentials().

cancel
void cancel()

Cancel the authentication challenge. This will also cancel the page loading and result in a #WebKitWebView::load-failed signal with a #WebKitNetworkError of type %WEBKIT_NETWORK_ERROR_CANCELLED being emitted.

getAuthenticationRequestStruct
WebKitAuthenticationRequest* getAuthenticationRequestStruct(bool transferOwnership)

Get the main Gtk struct

getHost
string getHost()

Get the host that this authentication challenge is applicable to.

getPort
uint getPort()

Get the port that this authentication challenge is applicable to.

getProposedCredential
Credential getProposedCredential()

Get the #WebKitCredential of the proposed authentication challenge that was stored from a previous session. The client can use this directly for authentication or construct their own #WebKitCredential.

getRealm
string getRealm()

Get the realm that this authentication challenge is applicable to.

getScheme
WebKitAuthenticationScheme getScheme()

Get the authentication scheme of the authentication challenge.

getSecurityOrigin
SecurityOrigin getSecurityOrigin()

Get the #WebKitSecurityOrigin that this authentication challenge is applicable to.

getStruct
void* getStruct()

the main Gtk struct as a void*

isForProxy
bool isForProxy()

Determine whether the authentication challenge is associated with a proxy server rather than an "origin" server.

isRetry
bool isRetry()

Determine whether this this is a first attempt or a retry for this authentication challenge.

setCanSaveCredentials
void setCanSaveCredentials(bool enabled)

Set whether the authentication method associated with @request should allow the storage of credentials. This should be used by applications handling their own credentials storage to indicate that it should be supported even when internal credential storage is disabled or unsupported. Note that storing of credentials will not be allowed on ephemeral sessions in any case.

setProposedCredential
void setProposedCredential(Credential credential)

Set the #WebKitCredential of the proposed authentication challenge that was stored from a previous session. This should only be used by applications handling their own credential storage. (When using the default WebKit credential storage, webkit_authentication_request_get_proposed_credential() already contains previously-stored credentials.) Passing a %NULL @credential will clear the proposed credential.

Static functions

getType
GType getType()

Variables

webKitAuthenticationRequest
WebKitAuthenticationRequest* webKitAuthenticationRequest;

the main Gtk struct

Meta