Top | Description | Object Hierarchy | Signals |
struct WebKitAuthenticationRequest; enum WebKitAuthenticationScheme; void webkit_authentication_request_authenticate (WebKitAuthenticationRequest *request
,WebKitCredential *credential
); void webkit_authentication_request_cancel (WebKitAuthenticationRequest *request
); gboolean webkit_authentication_request_can_save_credentials (WebKitAuthenticationRequest *request
); const gchar * webkit_authentication_request_get_host (WebKitAuthenticationRequest *request
); guint webkit_authentication_request_get_port (WebKitAuthenticationRequest *request
); gboolean webkit_authentication_request_is_retry (WebKitAuthenticationRequest *request
); WebKitCredential * webkit_authentication_request_get_proposed_credential (WebKitAuthenticationRequest *request
); const gchar * webkit_authentication_request_get_realm (WebKitAuthenticationRequest *request
); WebKitAuthenticationScheme webkit_authentication_request_get_scheme (WebKitAuthenticationRequest *request
); gboolean webkit_authentication_request_is_for_proxy (WebKitAuthenticationRequest *request
); WebKitCredential; enum WebKitCredentialPersistence; WebKitCredential * webkit_credential_new (const gchar *username
,const gchar *password
,WebKitCredentialPersistence persistence
); WebKitCredential * webkit_credential_copy (WebKitCredential *credential
); void webkit_credential_free (WebKitCredential *credential
); const gchar * webkit_credential_get_password (WebKitCredential *credential
); WebKitCredentialPersistence webkit_credential_get_persistence (WebKitCredential *credential
); const gchar * webkit_credential_get_username (WebKitCredential *credential
); gboolean webkit_credential_has_password (WebKitCredential *credential
);
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 "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.
typedef enum { WEBKIT_AUTHENTICATION_SCHEME_DEFAULT = 1, WEBKIT_AUTHENTICATION_SCHEME_HTTP_BASIC = 2, WEBKIT_AUTHENTICATION_SCHEME_HTTP_DIGEST = 3, WEBKIT_AUTHENTICATION_SCHEME_HTML_FORM = 4, WEBKIT_AUTHENTICATION_SCHEME_NTLM = 5, WEBKIT_AUTHENTICATION_SCHEME_NEGOTIATE = 6, WEBKIT_AUTHENTICATION_SCHEME_CLIENT_CERTIFICATE_REQUESTED = 7, WEBKIT_AUTHENTICATION_SCHEME_SERVER_TRUST_EVALUATION_REQUESTED = 8, WEBKIT_AUTHENTICATION_SCHEME_UNKNOWN = 100, } WebKitAuthenticationScheme;
Enum values representing the authentication scheme.
Since 2.2
void webkit_authentication_request_authenticate (WebKitAuthenticationRequest *request
,WebKitCredential *credential
);
Authenticate the WebKitAuthenticationRequest using the WebKitCredential
supplied. To continue without credentials, pass NULL
as credential
.
|
a WebKitAuthenticationRequest |
|
A WebKitCredential, or NULL . [transfer none][allow-none]
|
Since 2.2
void webkit_authentication_request_cancel
(WebKitAuthenticationRequest *request
);
Cancel the authentication challenge. This will also cancel the page loading and result in a
"load-failed" signal with a WebKitNetworkError of type WEBKIT_NETWORK_ERROR_CANCELLED
being emitted.
|
a WebKitAuthenticationRequest |
Since 2.2
gboolean webkit_authentication_request_can_save_credentials
(WebKitAuthenticationRequest *request
);
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
or if private browsing is enabled.
|
a WebKitAuthenticationRequest |
Returns : |
TRUE if webkit can store credentials or FALSE otherwise. |
Since 2.2
const gchar * webkit_authentication_request_get_host
(WebKitAuthenticationRequest *request
);
Get the host that this authentication challenge is applicable to.
|
a WebKitAuthenticationRequest |
Returns : |
The host of request . |
Since 2.2
guint webkit_authentication_request_get_port
(WebKitAuthenticationRequest *request
);
Get the port that this authentication challenge is applicable to.
|
a WebKitAuthenticationRequest |
Returns : |
The port of request . |
Since 2.2
gboolean webkit_authentication_request_is_retry
(WebKitAuthenticationRequest *request
);
Determine whether this this is a first attempt or a retry for this authentication challenge.
|
a WebKitAuthenticationRequest |
Returns : |
TRUE if authentication attempt is a retry or FALSE otherwise. |
Since 2.2
WebKitCredential * webkit_authentication_request_get_proposed_credential
(WebKitAuthenticationRequest *request
);
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.
|
a WebKitAuthenticationRequest |
Returns : |
A WebKitCredential encapsulating credential details
or NULL if there is no stored credential. [transfer full]
|
Since 2.2
const gchar * webkit_authentication_request_get_realm
(WebKitAuthenticationRequest *request
);
Get the realm that this authentication challenge is applicable to.
|
a WebKitAuthenticationRequest |
Returns : |
The realm of request . |
Since 2.2
WebKitAuthenticationScheme webkit_authentication_request_get_scheme
(WebKitAuthenticationRequest *request
);
Get the authentication scheme of the authentication challenge.
|
a WebKitAuthenticationRequest |
Returns : |
The WebKitAuthenticationScheme of request . |
Since 2.2
gboolean webkit_authentication_request_is_for_proxy
(WebKitAuthenticationRequest *request
);
Determine whether the authentication challenge is associated with a proxy server rather than an "origin" server.
|
a WebKitAuthenticationRequest |
Returns : |
TRUE if authentication is for a proxy or FALSE otherwise. |
Since 2.2
typedef enum { WEBKIT_CREDENTIAL_PERSISTENCE_NONE, WEBKIT_CREDENTIAL_PERSISTENCE_FOR_SESSION, WEBKIT_CREDENTIAL_PERSISTENCE_PERMANENT } WebKitCredentialPersistence;
Enum values representing the duration for which a credential persists.
Credential does not persist | |
Credential persists for session only | |
Credential persists permanently |
Since 2.2
WebKitCredential * webkit_credential_new (const gchar *username
,const gchar *password
,WebKitCredentialPersistence persistence
);
Create a new credential from the provided username, password and persistence mode.
|
The username for the new credential |
|
The password for the new credential |
|
The WebKitCredentialPersistence of the new credential |
Returns : |
A WebKitCredential. [transfer full] |
Since 2.2
WebKitCredential * webkit_credential_copy (WebKitCredential *credential
);
Make a copy of the WebKitCredential.
|
a WebKitCredential |
Returns : |
A copy of passed in WebKitCredential. [transfer full] |
Since 2.2
void webkit_credential_free (WebKitCredential *credential
);
Free the WebKitCredential.
|
A WebKitCredential |
Since 2.2
const gchar * webkit_credential_get_password (WebKitCredential *credential
);
Get the password currently held by this WebKitCredential.
|
a WebKitCredential |
Returns : |
The password stored in the WebKitCredential. |
Since 2.2
WebKitCredentialPersistence webkit_credential_get_persistence
(WebKitCredential *credential
);
Get the persistence mode currently held by this WebKitCredential.
|
a WebKitCredential |
Returns : |
The WebKitCredentialPersistence stored in the WebKitCredential. |
Since 2.2
const gchar * webkit_credential_get_username (WebKitCredential *credential
);
Get the username currently held by this WebKitCredential.
|
a WebKitCredential |
Returns : |
The username stored in the WebKitCredential. |
Since 2.2
gboolean webkit_credential_has_password (WebKitCredential *credential
);
Determine whether this credential has a password stored.
|
a WebKitCredential |
Returns : |
TRUE if the credential has a password or FALSE otherwise. |
Since 2.2
"cancelled"
signalvoid user_function (WebKitAuthenticationRequest *request,
gpointer user_data) : Run Last
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.
|
the WebKitAuthenticationRequest |
|
user data set when the signal handler was connected. |
Since 2.2