@@ -50,6 +50,7 @@ <h1>Full-run test for MakeCredential/GetAssertion for W3C Web Authentication</h1
5050 - response : AuthenticatorAttestationResponse : AuthenticatorResponse
5151 - attestationObject: CBOR object
5252 - clientDataJSON: serialized JSON
53+ - clientExtensionResults: (not yet supported)
5354 */
5455
5556 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
6566 let clientData = JSON . parse ( buffer2string ( aCredInfo . response . clientDataJSON ) ) ;
6667 is ( clientData . challenge , bytesToBase64UrlSafe ( gCredentialChallenge ) , "Challenge is correct" ) ;
6768 is ( clientData . origin , window . location . origin , "Origin is correct" ) ;
69+ is ( clientData . hashAlgorithm , "SHA-256" , "Hash algorithm is correct" ) ;
6870 is ( clientData . type , "webauthn.create" , "Type is correct" ) ;
6971
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+
7076 return webAuthnDecodeCBORAttestation ( aCredInfo . response . attestationObject )
7177 . then ( function ( aAttestationObj ) {
7278 // Make sure the RP ID hash matches what we calculate.
@@ -112,11 +118,13 @@ <h1>Full-run test for MakeCredential/GetAssertion for W3C Web Authentication</h1
112118 ok ( aAssertion . response . signature === aAssertion . response . signature , "AuthenticatorAssertionResponse.Signature is SameObject" ) ;
113119 ok ( aAssertion . response . signature instanceof ArrayBuffer , "AuthenticatorAssertionResponse.Signature is an ArrayBuffer" ) ;
114120 ok ( aAssertion . response . userHandle === null , "AuthenticatorAssertionResponse.UserHandle is null for u2f authenticators" ) ;
121+ isDeeply ( aAssertion . getClientExtensionResults ( ) , { } , "No extensions should be reported" ) ;
115122
116123 ok ( aAssertion . response . authenticatorData . byteLength > 0 , "Authenticator data exists" ) ;
117124 let clientData = JSON . parse ( buffer2string ( aAssertion . response . clientDataJSON ) ) ;
118125 is ( clientData . challenge , bytesToBase64UrlSafe ( gAssertionChallenge ) , "Challenge is correct" ) ;
119126 is ( clientData . origin , window . location . origin , "Origin is correct" ) ;
127+ is ( clientData . hashAlgorithm , "SHA-256" , "Hash algorithm is correct" ) ;
120128 is ( clientData . type , "webauthn.get" , "Type is correct" ) ;
121129
122130 return webAuthnDecodeAuthDataArray ( aAssertion . response . authenticatorData )
0 commit comments