merged
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using System.IdentityModel.Tokens.Jwt;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IdentityModel.Tokens.Jwt;
|
||||
using System.Security.Claims;
|
||||
using System.Text;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
@@ -15,7 +17,7 @@ public static class JwtTokenHelper
|
||||
string? email,
|
||||
string? firstname,
|
||||
string? lastname,
|
||||
string? portraitUrl)
|
||||
string? profilePictureUrl)
|
||||
{
|
||||
var securityKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(key));
|
||||
var credentials = new SigningCredentials(securityKey, SecurityAlgorithms.HmacSha256);
|
||||
@@ -31,9 +33,9 @@ public static class JwtTokenHelper
|
||||
new Claim(ClaimTypes.Surname, lastname),
|
||||
});
|
||||
|
||||
if (portraitUrl is not null)
|
||||
if (profilePictureUrl is not null)
|
||||
{
|
||||
claims.Add(new Claim("portrait-url", portraitUrl));
|
||||
claims.Add(new Claim("portrait-url", profilePictureUrl));
|
||||
}
|
||||
|
||||
var token = new JwtSecurityToken(
|
||||
|
||||
Reference in New Issue
Block a user