This commit is contained in:
Executable
+36
@@ -0,0 +1,36 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user