-
Notifications
You must be signed in to change notification settings - Fork 0
/
AuthenticatorAssertionResponse.cljs
73 lines (53 loc) · 2.45 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
(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.
[Read Only]
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 signature
"Property.
[Read Only]
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 user-handle
"Property.
[Read Only]
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)))