-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathCredentialManagementAPI.res
More file actions
141 lines (118 loc) · 3.78 KB
/
Copy pathCredentialManagementAPI.res
File metadata and controls
141 lines (118 loc) · 3.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
@@warning("-30")
open Prelude
open EventAPI
type authenticatorTransport =
| @as("ble") Ble
| @as("hybrid") Hybrid
| @as("internal") Internal
| @as("nfc") Nfc
| @as("usb") Usb
type credentialMediationRequirement =
| @as("conditional") Conditional
| @as("optional") Optional
| @as("required") Required
| @as("silent") Silent
type publicKeyCredentialType = | @as("public-key") PublicKey
type userVerificationRequirement =
| @as("discouraged") Discouraged
| @as("preferred") Preferred
| @as("required") Required
type authenticatorAttachment =
| @as("cross-platform") CrossPlatform
| @as("platform") Platform
type residentKeyRequirement =
| @as("discouraged") Discouraged
| @as("preferred") Preferred
| @as("required") Required
type attestationConveyancePreference =
| @as("direct") Direct
| @as("enterprise") Enterprise
| @as("indirect") Indirect
| @as("none") None
/**
[See CredentialsContainer on MDN](https://developer.mozilla.org/docs/Web/API/CredentialsContainer)
*/
@editor.completeFrom(CredentialsContainer)
type credentialsContainer = {}
/**
[See Credential on MDN](https://developer.mozilla.org/docs/Web/API/Credential)
*/
type credential = {
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Credential/id)
*/
id: string,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Credential/type)
*/
@as("type")
type_: string,
}
type publicKeyCredentialDescriptor = {
@as("type") mutable type_: publicKeyCredentialType,
mutable id: bufferSource,
mutable transports?: array<authenticatorTransport>,
}
type authenticationExtensionsPRFValues = {
mutable first: bufferSource,
mutable second?: bufferSource,
}
type authenticationExtensionsPRFInputs = {
mutable eval?: authenticationExtensionsPRFValues,
mutable evalByCredential?: any,
}
type authenticationExtensionsClientInputs = {
mutable minPinLength?: bool,
mutable hmacCreateSecret?: bool,
mutable appid?: string,
mutable credProps?: bool,
mutable prf?: authenticationExtensionsPRFInputs,
}
type publicKeyCredentialRequestOptions = {
mutable challenge: bufferSource,
mutable timeout?: int,
mutable rpId?: string,
mutable allowCredentials?: array<publicKeyCredentialDescriptor>,
mutable userVerification?: userVerificationRequirement,
mutable extensions?: authenticationExtensionsClientInputs,
}
type credentialRequestOptions = {
mutable mediation?: credentialMediationRequirement,
mutable signal?: abortSignal,
mutable publicKey?: publicKeyCredentialRequestOptions,
}
type publicKeyCredentialEntity = {mutable name: string}
type publicKeyCredentialRpEntity = {
...publicKeyCredentialEntity,
mutable id?: string,
}
type publicKeyCredentialUserEntity = {
...publicKeyCredentialEntity,
mutable id: bufferSource,
mutable displayName: string,
}
type publicKeyCredentialParameters = {
@as("type") mutable type_: publicKeyCredentialType,
mutable alg: int,
}
type authenticatorSelectionCriteria = {
mutable authenticatorAttachment?: authenticatorAttachment,
mutable residentKey?: residentKeyRequirement,
mutable requireResidentKey?: bool,
mutable userVerification?: userVerificationRequirement,
}
type publicKeyCredentialCreationOptions = {
mutable rp: publicKeyCredentialRpEntity,
mutable user: publicKeyCredentialUserEntity,
mutable challenge: bufferSource,
mutable pubKeyCredParams: array<publicKeyCredentialParameters>,
mutable timeout?: int,
mutable excludeCredentials?: array<publicKeyCredentialDescriptor>,
mutable authenticatorSelection?: authenticatorSelectionCriteria,
mutable attestation?: attestationConveyancePreference,
mutable extensions?: authenticationExtensionsClientInputs,
}
type credentialCreationOptions = {
mutable signal?: abortSignal,
mutable publicKey?: publicKeyCredentialCreationOptions,
}