Class
WebKit2AuthenticationRequest
Description [src]
class WebKit2.AuthenticationRequest : GObject.Object {
parent: 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 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.
Instance methods
webkit_authentication_request_authenticate
Authenticate the WebKitAuthenticationRequest
using the WebKitCredential
supplied. To continue without credentials, pass NULL
as credential
.
Available since: 2.2
webkit_authentication_request_can_save_credentials
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().
Available since: 2.2
webkit_authentication_request_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.
Available since: 2.2
webkit_authentication_request_get_certificate_pin_flags
Get the GTlsPasswordFlags
of the WEBKIT_AUTHENTICATION_SCHEME_CLIENT_CERTIFICATE_PIN_REQUESTED
authentication challenge.
Available since: 2.34
webkit_authentication_request_get_host
Get the host that this authentication challenge is applicable to.
Available since: 2.2
webkit_authentication_request_get_port
Get the port that this authentication challenge is applicable to.
Available since: 2.2
webkit_authentication_request_get_proposed_credential
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
.
Available since: 2.2
webkit_authentication_request_get_realm
Get the realm that this authentication challenge is applicable to.
Available since: 2.2
webkit_authentication_request_get_scheme
Get the authentication scheme of the authentication challenge.
Available since: 2.2
webkit_authentication_request_get_security_origin
Get the WebKitSecurityOrigin
that this authentication challenge is applicable to.
Available since: 2.30
webkit_authentication_request_is_for_proxy
Determine whether the authentication challenge is associated with a proxy server rather than an “origin” server.
Available since: 2.2
webkit_authentication_request_is_retry
Determine whether this this is a first attempt or a retry for this authentication challenge.
Available since: 2.2
webkit_authentication_request_set_can_save_credentials
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.
Available since: 2.30
webkit_authentication_request_set_proposed_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.
Available since: 2.30
Signals
WebKit2.AuthenticationRequest::authenticated
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.
Available since: 2.30
WebKit2.AuthenticationRequest::cancelled
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.
Available since: 2.2
Signals inherited from GObject (1)
GObject.Object::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct WebKit2AuthenticationRequestClass {
GObjectClass parent_class;
void (* _webkit_reserved0) (
void
);
void (* _webkit_reserved1) (
void
);
void (* _webkit_reserved2) (
void
);
void (* _webkit_reserved3) (
void
);
}
Class members
parent_class |
|
No description available. | |
_webkit_reserved0 |
|
No description available. | |
_webkit_reserved1 |
|
No description available. | |
_webkit_reserved2 |
|
No description available. | |
_webkit_reserved3 |
|
No description available. |