Skip to content

Commit 420b079

Browse files
authored
Merge pull request #275 from Yubico/dennisdyallo/fixes
fix: Correct logger for OtpSession
2 parents dc9fc52 + e956c1c commit 420b079

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Yubico.YubiKey/src/Yubico/YubiKey/Oath/OathSession.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414

1515
using System;
1616
using System.Globalization;
17-
using Microsoft.Extensions.Logging;
1817
using Yubico.Core.Logging;
19-
using Yubico.YubiKey.InterIndustry.Commands;
2018
using Yubico.YubiKey.Oath.Commands;
2119
using Yubico.YubiKey.Scp;
2220

@@ -83,7 +81,7 @@ public OathSession(IYubiKeyDevice yubiKey, ScpKeyParameters? keyParameters = nul
8381
: base(Log.GetLogger<OathSession>(), yubiKey, YubiKeyApplication.Oath, keyParameters)
8482
{
8583

86-
if (!(Connection.SelectApplicationData is OathApplicationData data))
84+
if (Connection.SelectApplicationData is not OathApplicationData data)
8785
{
8886
throw new InvalidOperationException(nameof(Connection.SelectApplicationData));
8987
}

Yubico.YubiKey/src/Yubico/YubiKey/Otp/OtpSession.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public sealed class OtpSession : ApplicationSession, IOtpSession
7777
/// <param name="keyParameters">An instance of <see cref="Scp03KeyParameters"/> containing the
7878
/// parameters for the SCP03 key. If <see langword="null"/>, the default parameters will be used. </param>
7979
public OtpSession(IYubiKeyDevice yubiKey, ScpKeyParameters? keyParameters = null)
80-
: base(Log.GetLogger<OathSession>(), yubiKey, YubiKeyApplication.Otp, keyParameters)
80+
: base(Log.GetLogger<OtpSession>(), yubiKey, YubiKeyApplication.Otp, keyParameters)
8181
{
8282
// Getting the OTP status allows the user to read the OTP status on the OtpSession object.
8383
_otpStatus = Connection.SendCommand(new ReadStatusCommand()).GetData();

0 commit comments

Comments
 (0)