Symmetric keys with jwt has been implemented

This commit is contained in:
Kun Deng
2022-09-04 20:34:33 -04:00
parent 00ef8d0242
commit d5944c470b
4 changed files with 83 additions and 26 deletions
+3
View File
@@ -20,6 +20,7 @@ namespace Icarus.Controllers.V1
{
[Route("api/v1/song/stream")]
[ApiController]
[Authorize]
public class SongStreamController : BaseController
{
#region Fields
@@ -46,10 +47,12 @@ namespace Icarus.Controllers.V1
[HttpGet("{id}")]
public async Task<IActionResult> Get(int id)
{
/**
if (!IsTokenValid("stream:songs"))
{
return StatusCode(401, "Not allowed");
}
*/
var context = new SongContext(_config.GetConnectionString("DefaultConnection"));