mirror of
https://github.com/QuotifyTeam/QuotifyBE.git
synced 2025-12-16 14:20:06 +01:00
fix: use userid for jwt, migration for user roles
This commit is contained in:
@@ -32,11 +32,12 @@ public class GeneralUseHelpers(ApplicationDbContext db, IConfiguration appsettin
|
||||
}
|
||||
}
|
||||
|
||||
public string GenerateJwtToken(string username)
|
||||
public string GenerateJwtToken(User user)
|
||||
{
|
||||
var claims = new[]
|
||||
{
|
||||
new Claim(JwtRegisteredClaimNames.Sub, username),
|
||||
new Claim(JwtRegisteredClaimNames.Sub, user.Id.ToString()),
|
||||
// new Claim(ClaimTypes.Role, )
|
||||
new Claim(JwtRegisteredClaimNames.Jti, Guid.NewGuid().ToString())
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user