WebKit2.AuthenticationRequest¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Name |
Short Description |
---|---|
This signal is emitted when the user authentication request succeeded. |
|
This signal is emitted when the user authentication request is cancelled. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class WebKit2.AuthenticationRequest(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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
WebKit2.WebView
::authenticate
signal with aWebKit2.AuthenticationRequest
object to provide client side authentication support. Credentials are exposed through theWebKit2.Credential
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
WebKit2.AuthenticationRequest
object.- authenticate(credential)¶
- Parameters:
credential (
WebKit2.Credential
orNone
) – AWebKit2.Credential
, orNone
Authenticate the
WebKit2.AuthenticationRequest
.Authenticate the
WebKit2.AuthenticationRequest
using theWebKit2.Credential
supplied. To continue without credentials, passNone
as credential.New in version 2.2.
- can_save_credentials()¶
-
Determine whether this
WebKit2.AuthenticationRequest
should allow the storage of credentials.Determine whether the authentication method associated with this
WebKit2.AuthenticationRequest
should allow the storage of credentials. This will returnFalse
if WebKit doesn’t support credential storing, if private browsing is enabled, or if persistent credential storage has been disabled inWebKit2.WebsiteDataManager
, unless credentials saving has been explicitly enabled withWebKit2.AuthenticationRequest.set_can_save_credentials
().New in version 2.2.
- cancel()¶
Cancel the authentication challenge.
This will also cancel the page loading and result in a
WebKit2.WebView
::load-failed
signal with aWebKit2.NetworkError
of typeWebKit2.NetworkError.CANCELLED
being emitted.New in version 2.2.
- get_certificate_pin_flags()¶
- Returns:
- Return type:
Get the
Gio.TlsPasswordFlags
of theWebKit2.AuthenticationScheme.CLIENT_CERTIFICATE_PIN_REQUESTED
authentication challenge.New in version 2.34.
- get_host()¶
- Returns:
The host of self.
- Return type:
Get the host that this authentication challenge is applicable to.
New in version 2.2.
- get_port()¶
- Returns:
The port of self.
- Return type:
Get the port that this authentication challenge is applicable to.
New in version 2.2.
- get_proposed_credential()¶
- Returns:
A
WebKit2.Credential
encapsulating credential details orNone
if there is no stored credential.- Return type:
Get the
WebKit2.Credential
of the proposed authentication challenge.Get the
WebKit2.Credential
of the proposed authentication challenge that was stored from a previous session. The client can use this directly for authentication or construct their ownWebKit2.Credential
.New in version 2.2.
- get_realm()¶
- Returns:
The realm of self.
- Return type:
Get the realm that this authentication challenge is applicable to.
New in version 2.2.
- get_scheme()¶
- Returns:
The
WebKit2.AuthenticationScheme
of self.- Return type:
Get the authentication scheme of the authentication challenge.
New in version 2.2.
- get_security_origin()¶
- Returns:
a newly created
WebKit2.SecurityOrigin
.- Return type:
Get the
WebKit2.SecurityOrigin
that this authentication challenge is applicable to.New in version 2.30.
- is_for_proxy()¶
-
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.
New in version 2.2.
- is_retry()¶
-
Determine whether this this is a first attempt or a retry for this authentication challenge.
New in version 2.2.
- set_can_save_credentials(enabled)¶
- Parameters:
enabled (
bool
) – value to set
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.
New in version 2.30.
- set_proposed_credential(credential)¶
- Parameters:
credential (
WebKit2.Credential
) – aWebKit2.Credential
, orNone
Set the
WebKit2.Credential
of the proposed authentication challenge.Set the
WebKit2.Credential
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,WebKit2.AuthenticationRequest.get_proposed_credential
() already contains previously-stored credentials.) Passing aNone
credential will clear the proposed credential.New in version 2.30.
Signal Details¶
- WebKit2.AuthenticationRequest.signals.authenticated(authentication_request, credential)¶
- Signal Name:
authenticated
- Flags:
- Parameters:
authentication_request (
WebKit2.AuthenticationRequest
) – The object which received the signalcredential (
WebKit2.Credential
) – theWebKit2.Credential
accepted
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.
New in version 2.30.
- WebKit2.AuthenticationRequest.signals.cancelled(authentication_request)¶
- Signal Name:
cancelled
- Flags:
- Parameters:
authentication_request (
WebKit2.AuthenticationRequest
) – The object which received the signal
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.
New in version 2.2.