Changer signature jwt jey
This commit is contained in:
@@ -29,7 +29,7 @@ public class LoginEndpoint(UsersRepository usersRepository, AutoMapper.IMapper m
|
||||
{
|
||||
string jwtToken = JwtBearer.CreateToken(o =>
|
||||
{
|
||||
o.SigningKey = "ThisIsASuperSecretJwtKeyThatIsAtLeast32CharsLong";
|
||||
o.SigningKey = "v9!Qx7#Lk2@pZ8$wR6!tN5%uF3&cD9^mH1*eY4";
|
||||
o.ExpireAt = DateTime.UtcNow.AddDays(15);
|
||||
o.User.Claims.Add(("Username", user.Username)!);
|
||||
o.User.Claims.Add(("FullName", user.FirstName + user.Name));
|
||||
|
||||
@@ -40,7 +40,7 @@ public class RefreshTokenEndpoint(UsersRepository usersRepository, AutoMapper.IM
|
||||
|
||||
string jwtToken = JwtBearer.CreateToken(o =>
|
||||
{
|
||||
o.SigningKey = "ThisIsASuperSecretJwtKeyThatIsAtLeast32CharsLong";
|
||||
o.SigningKey = "v9!Qx7#Lk2@pZ8$wR6!tN5%uF3&cD9^mH1*eY4";
|
||||
o.ExpireAt = DateTime.UtcNow.AddDays(15);
|
||||
o.User.Claims.Add(("Username", user.Username)!);
|
||||
o.User.Claims.Add(("FullName", user.FirstName + user.Name));
|
||||
|
||||
@@ -15,7 +15,7 @@ WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// On ajoute ici FastEndpoints, un framework REPR et Swagger aux services disponibles dans le projet
|
||||
builder.Services
|
||||
.AddAuthenticationJwtBearer(s => s.SigningKey = "ThisIsASuperSecretJwtKeyThatIsAtLeast32CharsLong")
|
||||
.AddAuthenticationJwtBearer(s => s.SigningKey = "v9!Qx7#Lk2@pZ8$wR6!tN5%uF3&cD9^mH1*eY4")
|
||||
.AddAuthorization()
|
||||
.AddFastEndpoints()
|
||||
.AddCors(options =>
|
||||
|
||||
Reference in New Issue
Block a user