• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Class (ClientAuthenticationHandler)
2
3Implements a **ClientAuthenticationHandler** object returned by the **Web** component. For details about the sample code, see [onClientAuthenticationRequest](./arkts-basic-components-web-events.md#onclientauthenticationrequest9).
4
5> **NOTE**
6>
7> - This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
8>
9> - The initial APIs of this class are supported since API version 9.
10>
11> - You can preview how this component looks on a real device, but not in DevEco Studio Previewer.
12
13## constructor<sup>9+</sup>
14
15constructor()
16
17Constructs a **ClientAuthenticationHandler**.
18
19**System capability**: SystemCapability.Web.Webview.Core
20
21## confirm<sup>9+</sup>
22
23confirm(priKeyFile : string, certChainFile : string): void
24
25Uses the specified private key and client certificate chain.
26
27**System capability**: SystemCapability.Web.Webview.Core
28
29**Parameters**
30
31| Name          | Type  | Mandatory  | Description              |
32| ------------- | ------ | ---- | ------------------ |
33| priKeyFile    | string | Yes   | Full path for storing the private key file. |
34| certChainFile | string | Yes   | Full path for storing the certificate chain file.|
35
36## confirm<sup>10+</sup>
37
38confirm(authUri : string): void
39
40Instructs the **Web** component to use the specified credentials (obtained from the certificate management module).
41
42> **NOTE**
43>
44> The **ohos.permission.ACCESS_CERT_MANAGER** permission must be declared.
45
46**System capability**: SystemCapability.Web.Webview.Core
47
48**Parameters**
49
50| Name    | Type  | Mandatory  | Description   |
51| ------- | ------ | ---- | ------- |
52| authUri | string | Yes   | Key value of the credentials.|
53
54## cancel<sup>9+</sup>
55
56cancel(): void
57
58Cancels the client certificate request sent by the same host and port server. No additional event will be reported for requests from the same host and port server.
59
60**System capability**: SystemCapability.Web.Webview.Core
61
62## ignore<sup>9+</sup>
63
64ignore(): void
65
66Ignores this request.
67
68**System capability**: SystemCapability.Web.Webview.Core
69