daviddesmet / paseto-dotnet

๐Ÿ”‘ Paseto.NET, a Paseto (Platform-Agnostic Security Tokens) implementation for .NET
MIT License
99 stars 8 forks source link

Fix Issuer Validation #67

Closed lyra95 closed 2 years ago

lyra95 commented 2 years ago

It's my first time contributing to open source, I did not know that I need to fork repo, instead of clone. haha...

daviddesmet commented 2 years ago

It's my first time contributing to open source, I did not know that I need to fork repo, instead of clone. haha...

No worries, we all have been there ๐Ÿ˜‰

daviddesmet commented 2 years ago

Closes #66

daviddesmet commented 2 years ago

@lyra95 would you also like to add a test to your PR? You just have to commit and push your changes and it will show up here.

lyra95 commented 2 years ago

Ok

lyra95 commented 2 years ago

I've added tests.

I wanted to narrow the test target down to the method ValidateIssuer(), but I could not because the method is protected in abstract class. Instead, I've written tests that generate tokens and verify them, which triggers the target method.

daviddesmet commented 2 years ago

@lyra95 Thanks for adding the tests, and donโ€™t worry, those are perfectly fine and should be testing the decoding of the token, there are already tests for the equality validator which the Issuer validator uses.

lyra95 commented 2 years ago

Thanks!