Skip to content

Instantly share code, notes, and snippets.

@jsmithedin
Created January 10, 2018 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsmithedin/612c7d281232201e737e419bf6a06dbf to your computer and use it in GitHub Desktop.
Save jsmithedin/612c7d281232201e737e419bf6a06dbf to your computer and use it in GitHub Desktop.
ASP.Net Core 2.0 - Require Authentication
[Authorize]
[Route("api")]
public class ApiController : Controller
{
[HttpGet("Test")]
public IActionResult Test()
{
return Ok("Content secured with Approov Token");
}
// rest of controller goes here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment