/// <inheritdoc/> public Task <IFactor> AddFactorAsync(string userId, AddHardwareFactorOptions hardwareFactorOptions, CancellationToken cancellationToken = default(CancellationToken)) { if (hardwareFactorOptions == null) { throw new ArgumentNullException(nameof(hardwareFactorOptions)); } if (hardwareFactorOptions.Provider == null) { throw new ArgumentNullException(nameof(hardwareFactorOptions.Provider)); } var verify = new VerifyFactorRequest { PassCode = hardwareFactorOptions.PassCode }; var factor = new HardwareFactor { FactorType = FactorType.TokenHardware, Provider = hardwareFactorOptions.Provider, Verify = verify }; return(AddFactorAsync(factor, userId, cancellationToken: cancellationToken)); }
public Task <IFactor> AddFactorAsync(AddHardwareFactorOptions hardwareFactorOptions, CancellationToken cancellationToken = default(CancellationToken)) => GetClient().UserFactors.AddFactorAsync(Id, hardwareFactorOptions, cancellationToken);