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

remove references to System.IdentityModel.Tokens.Jwt in JWT token generation #1657

Merged
merged 6 commits into from
Aug 18, 2022

Conversation

xingsy97
Copy link
Contributor

Summary of the changes

  • remove references to System.IdentityModel.Tokens.Jwt in JWT token generation

@xingsy97 xingsy97 marked this pull request as ready for review August 17, 2022 07:05
@xingsy97 xingsy97 enabled auto-merge (squash) August 17, 2022 07:06
@xingsy97 xingsy97 requested a review from vicancy August 17, 2022 07:07
@@ -79,7 +79,7 @@
<SignedPackageFile Include="$(PublishDir)Newtonsoft.Json.dll" Certificate="$(AssemblySigningCertName)" Visible="false" />
<SignedPackageFile Include="$(PublishDir)System.IO.Pipelines.dll" Certificate="$(AssemblySigningCertName)" Visible="false" />
<SignedPackageFile Include="$(PublishDir)System.IdentityModel.Tokens.Jwt.dll" Certificate="$(AssemblySigningCertName)" Visible="false" />
<SignedPackageFile Include="$(PublishDir)System.Text.Encodings.Web.dll" Certificate="$(AssemblySigningCertName)" Visible="false" />
<SignedPackageFile Include="$(PublishDir)System.Text.Encodings.Web.dll" Certificate="$(AssemblySigningCertName)" Visible="false" />
Copy link
Member

Choose a reason for hiding this comment

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

revert?

Copy link
Contributor Author

@xingsy97 xingsy97 Aug 17, 2022

Choose a reason for hiding this comment

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

This file is no longer in Files changed list

@@ -20,9 +18,9 @@

namespace Microsoft.Azure.SignalR
{
internal class JwtSecurityTokenHandlerSignalR : JwtSecurityTokenHandler
internal class JwtSecurityTokenHandlerSignalR
Copy link
Member

Choose a reason for hiding this comment

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

naming SignalRJwtSecurityTokenHandler

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed

@@ -57,8 +55,9 @@ internal class JwtSecurityTokenHandlerSignalR : JwtSecurityTokenHandler
JwtPayload payload = new JwtPayload(issuer, audience, (subject == null ? null : OutboundClaimTypeTransform(subject.Claims)), notBefore, expires, issuedAt);
JwtHeader header = new JwtHeader(kid, algorithm);

if (subject?.Actor != null)
payload.AddClaim(new Claim(JwtRegisteredClaimNames.Actort, CreateActorValue(subject.Actor)));
// Because subject.Actor is always null, we skip this
Copy link
Member

Choose a reason for hiding this comment

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

remove code, and merge the comment with the class comment above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@xingsy97 xingsy97 merged commit 999c342 into Azure:dev Aug 18, 2022
@xingsy97 xingsy97 deleted the update-jwt branch August 18, 2022 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants