From c3f5d90b6a127a84f547d5cf38097e248f2fef24 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Tue, 11 Mar 2025 10:32:28 +0100 Subject: [PATCH] =?UTF-8?q?refactor(PlaceholderAuthController):=20Update?= =?UTF-8?q?=20auf=20Login=20nur=20=C3=BCber=20Body=20und=20ohne=20Cookie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/PlaceHolderAuthController.cs | 52 ++++++------------- 1 file changed, 16 insertions(+), 36 deletions(-) diff --git a/WorkFlow.API/Controllers/PlaceHolderAuthController.cs b/WorkFlow.API/Controllers/PlaceHolderAuthController.cs index b920198..c233eca 100644 --- a/WorkFlow.API/Controllers/PlaceHolderAuthController.cs +++ b/WorkFlow.API/Controllers/PlaceHolderAuthController.cs @@ -1,44 +1,24 @@ -using Microsoft.AspNetCore.Authentication.Cookies; -using Microsoft.AspNetCore.Authentication; -using System.Security.Claims; -using Microsoft.AspNetCore.Mvc; -using DigitalData.UserManager.Application.Contracts; -using DigitalData.UserManager.Application.DTOs.User; +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Authorization; -using DigitalData.UserManager.Application; -using DigitalData.Core.Abstractions.Application; using WorkFlow.API.Models; using WorkFlow.API.Attributes; -namespace WorkFlow.API.Controllers +namespace WorkFlow.API.Controllers; + +//TODO: implement up-to-date AuthController in UserManager +[APIKeyAuth] +[Route("Auth")] +[ApiController] +[Tags("Auth")] +public class PlaceholderAuthController : ControllerBase { - //TODO: implement up-to-date AuthController in UserManager - [APIKeyAuth] - [Route("Auth")] - [ApiController] - public class PlaceholderAuthController : ControllerBase + [HttpPost] + public IActionResult CreateTokenViaBody([FromBody] Login login) { - [HttpPost("login")] - [AllowAnonymous] - public IActionResult Login([FromForm] Login login) - { - throw new NotImplementedException(); - } - - [HttpPost("logout")] - public IActionResult Logout() - { - throw new NotImplementedException(); - } - - [HttpPost] - public IActionResult CreateTokenViaBody([FromBody] Login login, [FromQuery] bool cookie = false) - { - throw new NotImplementedException(); - } - - [HttpGet("check")] - [Authorize] - public IActionResult Check() => Ok(); + throw new NotImplementedException(); } + + [HttpGet("check")] + [Authorize] + public IActionResult Check() => throw new NotImplementedException(); } \ No newline at end of file