public AccountController( IUserService userService, IMapper mapper, IOptions <JwtSecretKey> jwtSecretKey) { _userService = userService; _mapper = mapper; _jwtSecretKey = jwtSecretKey.Value; }
public ActionResult <string> Get() { var token = new JwtTokenBuilder(TokenType.Password, JwtSecretKey.Create("allegrosecretkey"), "Allegro Authentication", "Allegro.Authentication", "Allegro.Authentication") .AddClaims <Payload>(new Payload { UserId = 1, UserName = "******", Email = "*****@*****.**", FullName = "Ronald Sepuntos", }) .AddScope(new List <string> { "urn:allegro:tasks:getany", "urn:allegro:tasks:getany" }) .Build(); return(token.Value); }