/
AuthenticatorAttestationResponse.cljs
63 lines (47 loc) · 2.38 KB
/
AuthenticatorAttestationResponse.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
(ns web.auth.AuthenticatorAttestationResponse
"The AuthenticatorAttestationResponse interface of the Web Authentication
is returned by `CredentialsContainer.create()` when a `web.auth.PublicKeyCredential`
passed, and provides a cryptographic root of trust for the new
pair that has been generated. This response should be sent to
relying party's server to complete the creation of the credential."
(:refer-clojure :exclude []))
(defn get-transports
"Method.
getTransports() is a method of the `web.auth.AuthenticatorAttestationResponse`
that returns an `js.Array` containing strings describing the
transports which may be used by the authenticator.
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAttestationResponse/getTransports`"
[this & args]
(apply (-> this .-getTransports) (concat [this] args)))
(defn client-data-json-secure
"Property.
Client data for the authentication, such as origin and challenge.
clientDataJSON property is inherited from the AuthenticatorResponse."
[this]
(-> this (.clientDataJSONSecure)))
(defn set-client-data-json-secure!
"Property.
Client data for the authentication, such as origin and challenge.
clientDataJSON property is inherited from the AuthenticatorResponse."
[this val]
(aset this "clientDataJSONSecure" val))
(defn attestation-object
"Property.
The attestationObject property of the `web.auth.AuthenticatorAttestationResponse`
returns an `js.ArrayBuffer` containing the new public key, as
as signature over the entire attestationObject with a private
that is stored in the authenticator when it is manufactured.
`attestObj = authenticatorAttestationResponse.attestationObject`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAttestationResponse/attestationObject`"
[this]
(-> this (.attestationObject)))
(defn set-attestation-object!
"Property.
The attestationObject property of the `web.auth.AuthenticatorAttestationResponse`
returns an `js.ArrayBuffer` containing the new public key, as
as signature over the entire attestationObject with a private
that is stored in the authenticator when it is manufactured.
`attestObj = authenticatorAttestationResponse.attestationObject`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAttestationResponse/attestationObject`"
[this val]
(aset this "attestationObject" val))