@@ -50,6 +50,7 @@ <h1>Full-run test for MakeCredential/GetAssertion for W3C Web Authentication</h1
50
50
- response : AuthenticatorAttestationResponse : AuthenticatorResponse
51
51
- attestationObject: CBOR object
52
52
- clientDataJSON: serialized JSON
53
+ - clientExtensionResults: (not yet supported)
53
54
*/
54
55
55
56
is ( aCredInfo . type , "public-key" , "Credential type must be public-key" )
@@ -65,8 +66,13 @@ <h1>Full-run test for MakeCredential/GetAssertion for W3C Web Authentication</h1
65
66
let clientData = JSON . parse ( buffer2string ( aCredInfo . response . clientDataJSON ) ) ;
66
67
is ( clientData . challenge , bytesToBase64UrlSafe ( gCredentialChallenge ) , "Challenge is correct" ) ;
67
68
is ( clientData . origin , window . location . origin , "Origin is correct" ) ;
69
+ is ( clientData . hashAlgorithm , "SHA-256" , "Hash algorithm is correct" ) ;
68
70
is ( clientData . type , "webauthn.create" , "Type is correct" ) ;
69
71
72
+ let extensions = aCredInfo . getClientExtensionResults ( ) ;
73
+ is ( extensions . appid , undefined , "appid extension wasn't used" ) ;
74
+ is ( clientData . clientExtensions . appid , undefined , "appid extension wasn't sent" ) ;
75
+
70
76
return webAuthnDecodeCBORAttestation ( aCredInfo . response . attestationObject )
71
77
. then ( function ( aAttestationObj ) {
72
78
// Make sure the RP ID hash matches what we calculate.
@@ -112,6 +118,7 @@ <h1>Full-run test for MakeCredential/GetAssertion for W3C Web Authentication</h1
112
118
ok ( aAssertion . response . signature === aAssertion . response . signature , "AuthenticatorAssertionResponse.Signature is SameObject" ) ;
113
119
ok ( aAssertion . response . signature instanceof ArrayBuffer , "AuthenticatorAssertionResponse.Signature is an ArrayBuffer" ) ;
114
120
ok ( aAssertion . response . userHandle === null , "AuthenticatorAssertionResponse.UserHandle is null for u2f authenticators" ) ;
121
+ isDeeply ( aAssertion . getClientExtensionResults ( ) , { } , "No extensions should be reported" ) ;
115
122
116
123
ok ( aAssertion . response . authenticatorData . byteLength > 0 , "Authenticator data exists" ) ;
117
124
let clientData = JSON . parse ( buffer2string ( aAssertion . response . clientDataJSON ) ) ;
0 commit comments