From aa71ebc634063224ebb65994c070353dc90998a4 Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Tue, 30 Jan 2024 10:14:08 +0100 Subject: [PATCH] [PM-5731] chore: use primary constructor --- src/Core/Services/Fido2AuthenticatorService.cs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/Core/Services/Fido2AuthenticatorService.cs b/src/Core/Services/Fido2AuthenticatorService.cs index 071bd1cc7..807c04154 100644 --- a/src/Core/Services/Fido2AuthenticatorService.cs +++ b/src/Core/Services/Fido2AuthenticatorService.cs @@ -8,24 +8,11 @@ using System.Security.Cryptography; namespace Bit.Core.Services { - public class Fido2AuthenticatorService : IFido2AuthenticatorService + public class Fido2AuthenticatorService(ICipherService _cipherService, ISyncService _syncService, ICryptoFunctionService _cryptoFunctionService, IFido2UserInterface _userInterface) : IFido2AuthenticatorService { // AAGUID: d548826e-79b4-db40-a3d8-11116f7e8349 public static readonly byte[] AAGUID = [ 0xd5, 0x48, 0x82, 0x6e, 0x79, 0xb4, 0xdb, 0x40, 0xa3, 0xd8, 0x11, 0x11, 0x6f, 0x7e, 0x83, 0x49 ]; - private ICipherService _cipherService; - private ISyncService _syncService; - private ICryptoFunctionService _cryptoFunctionService; - private IFido2UserInterface _userInterface; - - public Fido2AuthenticatorService(ICipherService cipherService, ISyncService syncService, ICryptoFunctionService cryptoFunctionService, IFido2UserInterface userInterface) - { - _cipherService = cipherService; - _syncService = syncService; - _cryptoFunctionService = cryptoFunctionService; - _userInterface = userInterface; - } - public async Task MakeCredentialAsync(Fido2AuthenticatorMakeCredentialParams makeCredentialParams) { if (makeCredentialParams.CredTypesAndPubKeyAlgs.All((p) => p.Algorithm != (int) Fido2AlgorithmIdentifier.ES256))