Skip to content

Instantly share code, notes, and snippets.

@otaviolarrosa
Created May 1, 2018 14:40
Show Gist options
  • Save otaviolarrosa/b485be8e92eca0f457eaf0f83979324d to your computer and use it in GitHub Desktop.
Save otaviolarrosa/b485be8e92eca0f457eaf0f83979324d to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace JwtSample.Controllers
{
[Route("api/[controller]")]
public class ValuesController : Controller
{
[HttpGet]
[Authorize()]
public IEnumerable<string> Get()
{
return new string[] { "value1", "value2" };
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment