Skip to content

Commit

Permalink
Use collection initialier
Browse files Browse the repository at this point in the history
  • Loading branch information
marcominerva committed Jul 11, 2024
1 parent c14fc95 commit 418f63e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SimpleAuthentication/JwtBearer/JwtBearerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal class JwtBearerService(IOptions<JwtBearerSettings> jwtBearerSettingsOpt

public string CreateToken(string userName, IList<Claim>? claims = null, string? issuer = null, string? audience = null, DateTime? absoluteExpiration = null)
{
claims ??= new List<Claim>();
claims ??= [];
claims.Update(jwtBearerSettings.NameClaimType, userName);
claims.Update(JwtRegisteredClaimNames.Jti, Guid.NewGuid().ToString());
claims.Remove(JwtRegisteredClaimNames.Aud);
Expand Down

0 comments on commit 418f63e

Please sign in to comment.