37 lines
1.2 KiB
C#
Executable File
37 lines
1.2 KiB
C#
Executable File
using Microsoft.AspNetCore.Mvc;
|
|
using Auth.Services.DatabaseService;
|
|
using System.Web.Http;
|
|
using Auth.Entities;
|
|
|
|
namespace Auth.Controllers {
|
|
[ApiController]
|
|
[Route("api/oauth/")]
|
|
public class OAuthController : MistoxControllerBase {
|
|
|
|
public OAuthController(DatabaseService db) : base(db) {}
|
|
|
|
[HttpGet("/authorize")]
|
|
public async Task<ActionResult> Authorize([FromQuery] AuthorizationRequest request) {
|
|
try {
|
|
|
|
return NotFound("User is not logged in");
|
|
} catch (Exception ex) {
|
|
Console.WriteLine("Delete Error: " + ex.Message);
|
|
return NotFound("An internal server error has occured");
|
|
}
|
|
}
|
|
|
|
[HttpGet("/token")]
|
|
public async Task<ActionResult> Token([FromForm] TokenRequest request) {
|
|
try {
|
|
|
|
return NotFound("User is not logged in");
|
|
} catch (Exception ex) {
|
|
Console.WriteLine("Delete Error: " + ex.Message);
|
|
return NotFound("An internal server error has occured");
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|