WebKit.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:
Class Details¶
- class WebKit.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
WebKit.WebView
::authenticate
signal with aWebKit.AuthenticationRequest
object to provide client side authentication support. Credentials are exposed through theWebKit.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
WebKit.AuthenticationRequest
object.- authenticate(credential)¶
- Parameters:
credential (
WebKit.Credential
orNone
) – AWebKit.Credential
, orNone
Authenticate the
WebKit.AuthenticationRequest
.Authenticate the
WebKit.AuthenticationRequest
using theWebKit.Credential
supplied. To continue without credentials, passNone
as credential.New in version 2.2.
- can_save_credentials()¶
-
Determine whether this
WebKit.AuthenticationRequest
should allow the storage of credentials.Determine whether the authentication method associated with this
WebKit.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 inWebKit.WebsiteDataManager
, unless credentials saving has been explicitly enabled withWebKit.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
WebKit.WebView
::load-failed
signal with aWebKit.NetworkError
of typeWebKit.NetworkError.CANCELLED
being emitted.New in version 2.2.
- get_certificate_pin_flags()¶
- Returns:
- Return type:
Get the
Gio.TlsPasswordFlags
of theWebKit.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
WebKit.Credential
encapsulating credential details orNone
if there is no stored credential.- Return type:
Get the
WebKit.Credential
of the proposed authentication challenge.Get the
WebKit.Credential
of the proposed authentication challenge that was stored from a previous session. The client can use this directly for authentication or construct their ownWebKit.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
WebKit.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
WebKit.SecurityOrigin
.- Return type:
Get the
WebKit.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 (
WebKit.Credential
) – aWebKit.Credential
, orNone
Set the
WebKit.Credential
of the proposed authentication challenge.Set the
WebKit.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,WebKit.AuthenticationRequest.get_proposed_credential
() already contains previously-stored credentials.) Passing aNone
credential will clear the proposed credential.New in version 2.30.
Signal Details¶
- WebKit.AuthenticationRequest.signals.authenticated(authentication_request, credential)¶
- Signal Name:
authenticated
- Flags:
- Parameters:
authentication_request (
WebKit.AuthenticationRequest
) – The object which received the signalcredential (
WebKit.Credential
) – theWebKit.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.
- WebKit.AuthenticationRequest.signals.cancelled(authentication_request)¶
- Signal Name:
cancelled
- Flags:
- Parameters:
authentication_request (
WebKit.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.