summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--packages/server/src/attestation/generateAttestationOptions.test.ts4
-rw-r--r--packages/server/src/attestation/generateAttestationOptions.ts9
2 files changed, 7 insertions, 6 deletions
diff --git a/packages/server/src/attestation/generateAttestationOptions.test.ts b/packages/server/src/attestation/generateAttestationOptions.test.ts
index 08507e7..723f5fc 100644
--- a/packages/server/src/attestation/generateAttestationOptions.test.ts
+++ b/packages/server/src/attestation/generateAttestationOptions.test.ts
@@ -83,14 +83,14 @@ test('defaults to direct attestation if no attestation type is specified', () =>
expect(options.attestation).toEqual('none');
});
-test('should set authenticatorAttributes to authenticatorSelection if set', () => {
+test('should set authenticatorSelection if specified', () => {
const options = generateAttestationOptions({
serviceName: 'SimpleWebAuthn',
rpID: 'not.real',
challenge: 'totallyrandomvalue',
userID: '1234',
userName: 'usernameHere',
- authenticatorAttributes: {
+ authenticatorSelection: {
authenticatorAttachment: 'cross-platform',
requireResidentKey: false,
userVerification: 'preferred',
diff --git a/packages/server/src/attestation/generateAttestationOptions.ts b/packages/server/src/attestation/generateAttestationOptions.ts
index fbf62f4..59fc6f0 100644
--- a/packages/server/src/attestation/generateAttestationOptions.ts
+++ b/packages/server/src/attestation/generateAttestationOptions.ts
@@ -13,7 +13,7 @@ type Options = {
attestationType?: AttestationConveyancePreference,
excludedBase64CredentialIDs?: string[],
suggestedTransports?: AuthenticatorTransport[],
- authenticatorAttributes?: AuthenticatorSelectionCriteria,
+ authenticatorSelection?: AuthenticatorSelectionCriteria,
};
/**
@@ -32,7 +32,8 @@ type Options = {
* @param excludedBase64CredentialIDs Array of base64-encoded authenticator IDs registered by the
* user so the user can't register the same credential multiple times
* @param suggestedTransports Suggested types of authenticators for attestation
- * @param authenticatorAttributes Advanced criteria for the types of authenticators that may be used
+ * @param authenticatorSelection Advanced criteria for restricting the types of authenticators that
+ * may be used
*/
export default function generateAttestationOptions(
options: Options,
@@ -48,7 +49,7 @@ export default function generateAttestationOptions(
attestationType = 'none',
excludedBase64CredentialIDs = [],
suggestedTransports = ['usb', 'ble', 'nfc', 'internal'],
- authenticatorAttributes,
+ authenticatorSelection,
} = options;
return {
@@ -75,6 +76,6 @@ export default function generateAttestationOptions(
type: 'public-key',
transports: suggestedTransports,
})),
- authenticatorSelection: authenticatorAttributes,
+ authenticatorSelection,
};
}