Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Yubico.YubiKey/src/Yubico/YubiKey/Oath/OathSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

using System;
using System.Globalization;
using Microsoft.Extensions.Logging;
using Yubico.Core.Logging;
using Yubico.YubiKey.InterIndustry.Commands;
using Yubico.YubiKey.Oath.Commands;
using Yubico.YubiKey.Scp;

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

if (!(Connection.SelectApplicationData is OathApplicationData data))
if (Connection.SelectApplicationData is not OathApplicationData data)
{
throw new InvalidOperationException(nameof(Connection.SelectApplicationData));
}
Expand Down
2 changes: 1 addition & 1 deletion Yubico.YubiKey/src/Yubico/YubiKey/Otp/OtpSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public sealed class OtpSession : ApplicationSession, IOtpSession
/// <param name="keyParameters">An instance of <see cref="Scp03KeyParameters"/> containing the
/// parameters for the SCP03 key. If <see langword="null"/>, the default parameters will be used. </param>
public OtpSession(IYubiKeyDevice yubiKey, ScpKeyParameters? keyParameters = null)
: base(Log.GetLogger<OathSession>(), yubiKey, YubiKeyApplication.Otp, keyParameters)
: base(Log.GetLogger<OtpSession>(), yubiKey, YubiKeyApplication.Otp, keyParameters)
{
// Getting the OTP status allows the user to read the OTP status on the OtpSession object.
_otpStatus = Connection.SendCommand(new ReadStatusCommand()).GetData();
Expand Down
Loading