/
AuthenticatorAssertionResponse.cljs
111 lines (82 loc) · 4.04 KB
/
AuthenticatorAssertionResponse.cljs
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
(ns web.auth.AuthenticatorAssertionResponse
"The AuthenticatorAssertionResponse interface of the Web Authentication
is returned by `CredentialsContainer.get()` when a `web.auth.PublicKeyCredential`
passed, and provides proof to a service that it has a key pair
that the authentication request is valid and approved."
(:refer-clojure :exclude []))
(defn client-data-json
"Property.
The client data for the authentication, such as origin and challenge.
clientDataJSON property is inherited from the AuthenticatorResponse."
[this]
(-> this (.clientDataJSON)))
(defn set-client-data-json!
"Property.
The client data for the authentication, such as origin and challenge.
clientDataJSON property is inherited from the AuthenticatorResponse."
[this val]
(aset this "clientDataJSON" val))
(defn authenticator-data
"Property.
The authenticatorData property of the `web.auth.AuthenticatorAssertionResponse`
returns an `js.ArrayBuffer` containing information from the authenticator
as the Relying Party ID Hash (rpIdHash), a signature counter,
of user presence, user verification flags, and any extensions
by the authenticator.
`var authnrData = authenticatorAssertionResponse.authenticatorData;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAssertionResponse/authenticatorData`"
[this]
(-> this (.authenticatorData)))
(defn set-authenticator-data!
"Property.
The authenticatorData property of the `web.auth.AuthenticatorAssertionResponse`
returns an `js.ArrayBuffer` containing information from the authenticator
as the Relying Party ID Hash (rpIdHash), a signature counter,
of user presence, user verification flags, and any extensions
by the authenticator.
`var authnrData = authenticatorAssertionResponse.authenticatorData;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAssertionResponse/authenticatorData`"
[this val]
(aset this "authenticatorData" val))
(defn signature
"Property.
The signature read-only property of the `web.auth.AuthenticatorAssertionResponse`
is an `js.ArrayBuffer` object which is the signature of the authenticator
both `AuthenticatorAssertionResponse.authenticatorData` and a
hash of the client data (`AuthenticatorAssertionResponse.clientDataJSON`).
`signature = authenticatorAssertionResponse.signature`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAssertionResponse/signature`"
[this]
(-> this (.signature)))
(defn set-signature!
"Property.
The signature read-only property of the `web.auth.AuthenticatorAssertionResponse`
is an `js.ArrayBuffer` object which is the signature of the authenticator
both `AuthenticatorAssertionResponse.authenticatorData` and a
hash of the client data (`AuthenticatorAssertionResponse.clientDataJSON`).
`signature = authenticatorAssertionResponse.signature`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAssertionResponse/signature`"
[this val]
(aset this "signature" val))
(defn user-handle
"Property.
The userHandle read-only property of the `web.auth.AuthenticatorAssertionResponse`
is an `js.ArrayBuffer` object which is an opaque identifier for
given user. Such an identifier can be used by the relying party's
to link the user account with its corresponding credentials and
data.
`userHandle = authenticatorAssertionResponse.userHandle`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAssertionResponse/userHandle`"
[this]
(-> this (.userHandle)))
(defn set-user-handle!
"Property.
The userHandle read-only property of the `web.auth.AuthenticatorAssertionResponse`
is an `js.ArrayBuffer` object which is an opaque identifier for
given user. Such an identifier can be used by the relying party's
to link the user account with its corresponding credentials and
data.
`userHandle = authenticatorAssertionResponse.userHandle`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAssertionResponse/userHandle`"
[this val]
(aset this "userHandle" val))