Yubico / Yubico.NET.SDK

A YubiKey SDK for .NET developers
Apache License 2.0
96 stars 48 forks source link

Validate OTPs #55

Closed fin3ss3g0d closed 10 months ago

fin3ss3g0d commented 11 months ago

I was shocked when I came across this SDK and the documentation for it doesn't include any functionality to validate OTPs with the YubiCloud API. Since the client mentioned here is deprecated Yubico dotnet client why not include the functionality in this SDK? This stackoverflow post accomplishes the task simple enough and shouldn't require that much code howto-verify-a-yubico-otp-response. It's great to provide the functionality to configure the OTP slots of Yubikey's with the SDK, but I think a lot of people would agree the SDK should also come with a function to validate OTPs. I bet a lot of people would appreciate and use that code if it was added.

GregDomzalski commented 10 months ago

Hello, and thank you for your feedback.

The focus of this SDK is for YubiKey configuration and not so much interacting with our services.

That said - we do have some test code / example code that I believe demonstrates the OTP validation scenario end-to-end.

Please have a look at this file: Yubico.YubiKey/tests/sandbox/Plugins/Otp/YubiOtp.cs

If we hear enough feedback, I think we'd be willing to reintroduce some kind of library or utility to do what you ask. If you have a relationship with any of our sales engineers or account teams, raising this with them is a great way to get the attention of our product leadership. That said - I will raise this idea with them as well.

For the moment, I will close this issue - but folks are free to upvote and/or add additional comments. If our product team decides to act on this, I will resurrect this issue and report back.

Sorry this isn't exactly the answer you'd have liked. I hope the above sample code is at least a start.