diff --git a/Controllers/v1/SongStreamController.cs b/Controllers/v1/SongStreamController.cs index 3c6f0cb..d4ed08b 100644 --- a/Controllers/v1/SongStreamController.cs +++ b/Controllers/v1/SongStreamController.cs @@ -39,6 +39,7 @@ namespace Icarus.Controllers.V1 #region HTTP endpoints [HttpGet("{id}")] + [Authorize("stream:songs")] public async Task Get(int id) { var songStore= HttpContext diff --git a/Startup.cs b/Startup.cs index 13a6e57..d94ed58 100644 --- a/Startup.cs +++ b/Startup.cs @@ -92,6 +92,11 @@ namespace Icarus policy .Requirements .Add(new HasScopeRequirement("read:albums", domain))); + + options.AddPolicy("stream:songs", policy => + policy + .Requirements + .Add(new HasScopeRequirement("stream:songs", domain))); });