Add the language to the user.
This commit is contained in:
@@ -15,5 +15,7 @@
|
||||
public string Password { get; set; }
|
||||
|
||||
public bool IsAdmin { get; set; }
|
||||
|
||||
public string Language { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -118,7 +118,8 @@ namespace skydiveLogs_api.Controllers
|
||||
new Claim(ClaimTypes.Name, foundUser.Login),
|
||||
new Claim(ClaimTypes.UserData, foundUser.Id.ToString()),
|
||||
new Claim(ClaimTypes.Email, foundUser.Email),
|
||||
new Claim(ClaimTypes.Role, foundUser.Roles)
|
||||
new Claim(ClaimTypes.Role, foundUser.Roles),
|
||||
new Claim("Language", foundUser.Language ?? "")
|
||||
});
|
||||
|
||||
return new JwtSecurityTokenHandler().WriteToken(token);
|
||||
|
||||
@@ -11,5 +11,7 @@
|
||||
public string Password { get; set; }
|
||||
|
||||
public string Email { get; set; }
|
||||
|
||||
public string Language { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -15,5 +15,7 @@
|
||||
public string Roles { get; set; }
|
||||
|
||||
public string Token { get; set; }
|
||||
|
||||
public string Language { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoMapper" Version="10.1.1" />
|
||||
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="8.1.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.5" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.6" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.2" />
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.11.0" />
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user