-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExampleController.cs
More file actions
32 lines (30 loc) · 717 Bytes
/
ExampleController.cs
File metadata and controls
32 lines (30 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System.Collections.Generic;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Example.Net5._0.AuthenticationWithRefreshToken.Controllers
{
[ApiController]
[Route("[controller]")]
public class ExampleController : ControllerBase
{
private static readonly string[] Summaries =
{
"Freezing",
"Bracing",
"Chilly",
"Cool",
"Mild",
"Warm",
"Balmy",
"Hot",
"Sweltering",
"Scorching",
};
[Authorize]
[HttpGet]
public IEnumerable<object> Get()
{
return Summaries;
}
}
}