diff --git a/docs/api/session.md b/docs/api/session.md index f15f5bbea360..9e1891043fd3 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -363,6 +363,13 @@ event. The [DownloadItem](download-item.md) will not have any `WebContents` asso the initial state will be `interrupted`. The download will start only when the `resume` API is called on the [DownloadItem](download-item.md). +#### `ses.clearAuthCache(options[, callback])` + +* `options` ([RemovePassword](structures/remove-password.md) | [RemoveClientCertificate](structures/remove-client-certificate.md)) +* `callback` Function (optional) - Called when operation is done + +Clears the session’s HTTP authentication cache. + ### Instance Properties The following properties are available on instances of `Session`: diff --git a/docs/api/structures/remove-client-certificate.md b/docs/api/structures/remove-client-certificate.md new file mode 100644 index 000000000000..7ec853f1633b --- /dev/null +++ b/docs/api/structures/remove-client-certificate.md @@ -0,0 +1,5 @@ +# RemoveClientCertificate Object + +* `type` String - `clientCertificate`. +* `origin` String - Origin of the server whose associated client certificate + must be removed from the cache. diff --git a/docs/api/structures/remove-password.md b/docs/api/structures/remove-password.md new file mode 100644 index 000000000000..28a9ed8ae104 --- /dev/null +++ b/docs/api/structures/remove-password.md @@ -0,0 +1,15 @@ +# RemovePassword Object + +* `type` String - `password`. +* `origin` String (optional) - When provided, the authentication info + related to the origin will only be removed otherwise the entire cache + will be cleared. +* `scheme` String (optional) - Scheme of the authentication. + Can be `basic`, `digest`, `ntlm`, `negotiate`. Must be provided if + removing by `origin`. +* `realm` String (optional) - Realm of the authentication. Must be provided if + removing by `origin`. +* `username` String (optional) - Credentials of the authentication. Must be + provided if removing by `origin`. +* `password` String (optional) - Credentials of the authentication. Must be + provided if removing by `origin`.