Introspection access point properly uses basic auth of client id and secret to access
32 lines
798 B
C#
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";
|
|
}
|
|
|
|
}
|
|
} |