Created
September 24, 2018 19:37
-
-
Save merken/58d440c9a1736571ffb14030af1caabb to your computer and use it in GitHub Desktop.
DataController.1.cs
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using auth.api.Extensions; | |
using auth.api.Security; | |
using auth.api.Security.MyDb; | |
using Microsoft.AspNetCore.Authorization; | |
using Microsoft.AspNetCore.Mvc; | |
namespace auth.api.Controllers | |
{ | |
[Route("api/data")] | |
[ApiController] | |
public class DataController : ControllerBase | |
{ | |
[HttpGet] | |
public ActionResult<IEnumerable<string>> Get() | |
{ | |
return new string[] { "secret", "data", HttpContext.User.Identity.Name }; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment