public string GenerateToken(User user) { List <Claim> claims = new List <Claim>() { new Claim("id", user.Id.ToString()), new Claim(ClaimTypes.Name, user.Username), new Claim(ClaimTypes.Email, user.Email) }; return(_tokenGenerator.GenerateToken(_config.AccessTokenSecret, _config.Issuer, _config.Audience, _config.AccessTokenExpirationMinutes, claims)); }
public string GenerateToken() { return(_tokenGenerator.GenerateToken(_config.RefreshTokenSecret, _config.Issuer, _config.Audience, _config.RefreshTokenExpirationMinutes)); }