@@ -22,7 +22,7 @@ export async function createPublicKeyCredential(origin: string, options: Credent
2222 options . publicKey . rp . id = options . publicKey . rp . id || getDomainFromOrigin ( origin ) ;
2323
2424 // Step 11
25- const clientExtensions = undefined ; // ToDo clientExtensions
25+ let clientExtensions = undefined ;
2626 let authenticatorExtensions = undefined ;
2727 if ( options . publicKey . extensions ) {
2828 const reqExt : any = options . publicKey . extensions ;
@@ -32,6 +32,7 @@ export async function createPublicKeyCredential(origin: string, options: Credent
3232 log . debug ( 'PSK extension has valid client input' ) ;
3333 const authenticatorExtensionInput = new Uint8Array ( CBOR . encodeCanonical ( null ) ) ;
3434 authenticatorExtensions = new Map ( [ [ PSK_EXTENSION_IDENTIFIER , byteArrayToBase64 ( authenticatorExtensionInput , true ) ] ] ) ;
35+ clientExtensions = { [ PSK_EXTENSION_IDENTIFIER ] : true } ;
3536 }
3637 }
3738 }
@@ -66,7 +67,7 @@ export async function createPublicKeyCredential(origin: string, options: Credent
6667 log . debug ( 'Received attestation object' ) ;
6768
6869 return {
69- getClientExtensionResults : ( ) => ( { } ) ,
70+ getClientExtensionResults : ( ) => ( clientExtensions ) ,
7071 id : attObjWrapper . credentialId ,
7172 rawId : base64ToByteArray ( attObjWrapper . credentialId , true ) ,
7273 response : {
@@ -87,7 +88,7 @@ export async function getPublicKeyCredential(origin: string, options: Credential
8788 const rpID = options . publicKey . rpId || getDomainFromOrigin ( origin ) ;
8889
8990 // Step 8 + 9
90- // ToDo Each authenticator extension is an client extension!
91+ // ToDo Authenticator Extension
9192
9293 // Step 10 + 11
9394 const clientDataJSON = generateClientDataJSON ( Get , options . publicKey . challenge as ArrayBuffer , origin ) ;
0 commit comments