Files
PetriePanel/WebAPI/Controllers/HelloWorldController.cs
littlefoot 320d939c76 Authentication finally moved to the dotnet way in webapi, ready to be added to to deal with users and such
Introspection access point properly uses basic auth of client id and secret to access
2021-10-14 20:54:58 -04:00

32 lines
798 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WebAPI.Auth;
using WebAPI.Data;
namespace WebAPI.Controllers
{
[Authorize(Policy = "test")]
[Route("api/[controller]")]
[ApiController]
public class HelloWorldController : BaseController
{
private readonly PterodactylService _pterodactylService;
public HelloWorldController(PterodactylService pterodactylService)
{
_pterodactylService = pterodactylService;
}
[HttpGet]
public async Task<string> HelloWorld()
{
return "Success";
}
}
}