Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace JwtSecurityToken with JsonWebToken #7177

Merged
merged 4 commits into from
Jun 13, 2024
Merged

Replace JwtSecurityToken with JsonWebToken #7177

merged 4 commits into from
Jun 13, 2024

Conversation

rubo
Copy link
Contributor

@rubo rubo commented Jun 12, 2024

Changes

  • Replaced JwtSecurityToken with the new JsonWebToken that's up to 30% faster, as Microsoft claims
  • Made the JwtAuthentication.Authenticate() method async because of the underlying handler async API, which in turn caused chained async changes in several places

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

@rubo rubo marked this pull request as ready for review June 12, 2024 21:48
@@ -10,7 +10,7 @@ namespace Nethermind.Sockets
public interface IWebSocketsModule
{
string Name { get; }
ISocketsClient CreateClient(WebSocket webSocket, string client, HttpContext context);
Task<ISocketsClient> CreateClient(WebSocket webSocket, string client, HttpContext context);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use valuetask as we won't need the task later

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or no task at all?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the interface implementations added an await call. Thats why it was added

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah and it is the main one

@@ -10,7 +10,7 @@ namespace Nethermind.Sockets
public interface IWebSocketsModule
{
string Name { get; }
ISocketsClient CreateClient(WebSocket webSocket, string client, HttpContext context);
Task<ISocketsClient> CreateClient(WebSocket webSocket, string client, HttpContext context);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or no task at all?

@rubo rubo merged commit 5b34399 into master Jun 13, 2024
68 checks passed
@rubo rubo deleted the feature/jwt-update branch June 13, 2024 12:51
@rubo rubo mentioned this pull request Jun 20, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants