Add the language to the user.
This commit is contained in:
@@ -4,16 +4,18 @@
|
|||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
public string Email { get; set; }
|
public string Email { get; set; }
|
||||||
|
|
||||||
public string FirstName { get; set; }
|
public string FirstName { get; set; }
|
||||||
|
|
||||||
public string LastName { get; set; }
|
public string LastName { get; set; }
|
||||||
|
|
||||||
public string Login { get; set; }
|
public string Login { get; set; }
|
||||||
|
|
||||||
public string Password { get; set; }
|
public string Password { get; set; }
|
||||||
|
|
||||||
public bool IsAdmin { 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.Name, foundUser.Login),
|
||||||
new Claim(ClaimTypes.UserData, foundUser.Id.ToString()),
|
new Claim(ClaimTypes.UserData, foundUser.Id.ToString()),
|
||||||
new Claim(ClaimTypes.Email, foundUser.Email),
|
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);
|
return new JwtSecurityTokenHandler().WriteToken(token);
|
||||||
|
|||||||
@@ -11,5 +11,7 @@
|
|||||||
public string Password { get; set; }
|
public string Password { get; set; }
|
||||||
|
|
||||||
public string Email { get; set; }
|
public string Email { get; set; }
|
||||||
|
|
||||||
|
public string Language { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
public string Email { get; set; }
|
public string Email { get; set; }
|
||||||
|
|
||||||
public string FirstName { get; set; }
|
public string FirstName { get; set; }
|
||||||
|
|
||||||
@@ -15,5 +15,7 @@
|
|||||||
public string Roles { get; set; }
|
public string Roles { get; set; }
|
||||||
|
|
||||||
public string Token { get; set; }
|
public string Token { get; set; }
|
||||||
|
|
||||||
|
public string Language { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="AutoMapper" Version="10.1.1" />
|
<PackageReference Include="AutoMapper" Version="10.1.1" />
|
||||||
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="8.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="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.2" />
|
||||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.11.0" />
|
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.11.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user