Added CORS, added specific type for token in AuthToken.cs, added login page to blazor client
This commit is contained in:
		| @@ -1,6 +1,7 @@ | ||||
| using System.IdentityModel.Tokens.Jwt; | ||||
| using System.Security.Claims; | ||||
| using ApplicationLayer.InfrastructureServicesInterfaces; | ||||
| using ApplicationLayer.Services.AuthServices.Common; | ||||
| using ApplicationLayer.Services.AuthServices.NeededServices; | ||||
| using Domains.Users; | ||||
|  | ||||
| @@ -14,7 +15,7 @@ public class TokenGenerator(TokenGeneratorOptions options, JwtSecurityTokenHandl | ||||
|     : ITokenGenerator | ||||
| { | ||||
|     /// <inheritdoc cref="ITokenGenerator.CreateToken"/> | ||||
|     public string CreateToken(User user) | ||||
|     public AuthToken CreateToken(User user) | ||||
|     { | ||||
|         var claims = new List<Claim> | ||||
|         { | ||||
| @@ -29,6 +30,6 @@ public class TokenGenerator(TokenGeneratorOptions options, JwtSecurityTokenHandl | ||||
|             signingCredentials: options.Credentials, | ||||
|             claims: claims); | ||||
|  | ||||
|         return tokenHandler.WriteToken(token); | ||||
|         return new AuthToken(tokenHandler.WriteToken(token)); | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user