Created
December 5, 2017 00:01
-
-
Save HamidMosalla/daf39da79603c0e264a2b1dcfb66e3c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace ApiResource.Controllers | |
{ | |
[Produces("application/json")] | |
[Authorize] | |
[Route("api/ApiResourceWithoutPolicy")] | |
public class ApiResourceWithoutPolicyController : Controller | |
{ | |
[HttpGet] | |
public IActionResult Get() | |
{ | |
return new JsonResult(new { ResourceType = "Without Policy", ResourceName = "Api1" }); | |
} | |
} | |
[Produces("application/json")] | |
[Authorize("Founder")] | |
[Route("api/ApiResourceWithPolicy")] | |
public class ApiResourceWithPolicyController : Controller | |
{ | |
[HttpGet] | |
public IActionResult Get() | |
{ | |
return new JsonResult(new { ResourceType = "With Policy", ResourceName = "Api2" }); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment