1.1 <WebKitAuthenticationRequest>

Class: <WebKitAuthenticationRequest>

It derives from <GObject>.

Represents an authentication request.

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 web-view: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.

Procedures

Method: authentication-request:authenticate self [credential]
Method: authenticate self [credential]

Authenticate the <WebKitAuthenticationRequest>.

Authenticate the <WebKitAuthenticationRequest> using the <WebKitCredential> supplied. To continue without credentials, pass #f as credential.

self

Passed: a <WebKitAuthenticationRequest>.

a <WebKitAuthenticationRequest>

credential

Passed, or left out: a <WebKitCredential>, or #f.

A <WebKitCredential>, or #f

Method: authentication-request:can-save-credentials? self ⇒ %return
Method: can-save-credentials? self ⇒ %return

Determine whether this <WebKitAuthenticationRequest> should allow the storage of credentials.

Determine whether the authentication method associated with this <WebKitAuthenticationRequest> should allow the storage of credentials. This will return #f 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 authentication-request:set-can-save-credentials.

self

Passed: a <WebKitAuthenticationRequest>.

a <WebKitAuthenticationRequest>

%return

Returned: a boolean.

#t if WebKit can store credentials or #f otherwise.

Method: authentication-request:cancel self
Method: cancel self

Cancel the authentication challenge.

This will also cancel the page loading and result in a web-view:load-failed signal with a <WebKitNetworkError> of type cancelled being emitted.

self

Passed: a <WebKitAuthenticationRequest>.

a <WebKitAuthenticationRequest>

Method: authentication-request:get-certificate-pin-flags self ⇒ %return
Method: get-certificate-pin-flags self ⇒ %return

Get the <GTlsPasswordFlags> of the client-certificate-pin-requested authentication challenge.

self

Passed: a <WebKitAuthenticationRequest>.

a <WebKitAuthenticationRequest>

%return

Returned: a <GTlsPasswordFlags>.

a <GTlsPasswordFlags>

Method: authentication-request:get-host self ⇒ %return
Method: get-host self ⇒ %return

Get the host that this authentication challenge is applicable to.

self

Passed: a <WebKitAuthenticationRequest>.

a <WebKitAuthenticationRequest>

%return

Returned: a string.

The host of self.

Method: authentication-request:get-port self ⇒ %return
Method: get-port self ⇒ %return

Get the port that this authentication challenge is applicable to.

self

Passed: a <WebKitAuthenticationRequest>.

a <WebKitAuthenticationRequest>

%return

Returned: an unsigned 32-bit integer.

The port of self.

Method: authentication-request:get-proposed-credential self ⇒ %return
Method: get-proposed-credential self ⇒ %return

Get the <WebKitCredential> of the proposed authentication challenge.

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

self

Passed: a <WebKitAuthenticationRequest>.

a <WebKitAuthenticationRequest>

%return

Returned: a <WebKitCredential>.

A <WebKitCredential> encapsulating credential details or #f if there is no stored credential.

Method: authentication-request:get-realm self ⇒ %return
Method: get-realm self ⇒ %return

Get the realm that this authentication challenge is applicable to.

self

Passed: a <WebKitAuthenticationRequest>.

a <WebKitAuthenticationRequest>

%return

Returned: a string.

The realm of self.

Method: authentication-request:get-scheme self ⇒ %return
Method: get-scheme self ⇒ %return

Get the authentication scheme of the authentication challenge.

self

Passed: a <WebKitAuthenticationRequest>.

a <WebKitAuthenticationRequest>

%return

Returned: a <WebKitAuthenticationScheme>.

The <WebKitAuthenticationScheme> of self.

Method: authentication-request:get-security-origin self ⇒ %return
Method: get-security-origin self ⇒ %return

Get the <WebKitSecurityOrigin> that this authentication challenge is applicable to.

self

Passed: a <WebKitAuthenticationRequest>.

a <WebKitAuthenticationRequest>

%return

Returned: a <WebKitSecurityOrigin>.

a newly created <WebKitSecurityOrigin>.

Method: authentication-request:is-for-proxy? self ⇒ %return
Method: is-for-proxy? self ⇒ %return

Determine whether the authentication challenge is associated with a proxy server.

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

self

Passed: a <WebKitAuthenticationRequest>.

a <WebKitAuthenticationRequest>

%return

Returned: a boolean.

#t if authentication is for a proxy or #f otherwise.

Method: authentication-request:is-retry? self ⇒ %return
Method: is-retry? self ⇒ %return

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

self

Passed: a <WebKitAuthenticationRequest>.

a <WebKitAuthenticationRequest>

%return

Returned: a boolean.

#t if authentication attempt is a retry or #f otherwise.

Method: authentication-request:set-can-save-credentials self enabled
Method: set-can-save-credentials self enabled

Set whether the authentication method associated with self should allow the storage of credentials.

Set whether the authentication method associated with self 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.

self

Passed: a <WebKitAuthenticationRequest>.

a <WebKitAuthenticationRequest>

enabled

Passed: a boolean.

value to set

Method: authentication-request:set-proposed-credential self credential
Method: set-proposed-credential self credential

Set the <WebKitCredential> of the proposed authentication challenge.

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, authentication-request:get-proposed-credential already contains previously-stored credentials.) Passing a #f credential will clear the proposed credential.

self

Passed: a <WebKitAuthenticationRequest>.

a <WebKitAuthenticationRequest>

credential

Passed: a <WebKitCredential>.

a <WebKitCredential>, or #f

Signals

Signal: authentication-request:authenticated

Connect a handler with (connect object authentication-request:authenticated handler). It is called as (handler self credential).

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.

self

Passed: a <WebKitAuthenticationRequest>.

credential

Passed: a <WebKitCredential>.

the <WebKitCredential> accepted

Signal: authentication-request:cancelled

Connect a handler with (connect object authentication-request:cancelled handler). It is called as (handler self).

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.

self

Passed: a <WebKitAuthenticationRequest>.