Spaces:
Runtime error
Runtime error
Download src/SCM.Api/Controllers/AuthController.cs from rafaeldavila/scm-api: direct link, hf CLI and curl.
- Browser
- Download file 1.15 kB
-
https://huggingface.co/spaces/rafaeldavila/scm-api/resolve/main/src/SCM.Api/Controllers/AuthController.cs
- Command line
-
hf download hf://spaces/rafaeldavila/scm-api/src/SCM.Api/Controllers/AuthController.cs
-
curl -L -o AuthController.cs https://huggingface.co/spaces/rafaeldavila/scm-api/resolve/main/src/SCM.Api/Controllers/AuthController.cs
1.15 kB
| using Asp.Versioning; | |
| using Microsoft.AspNetCore.Authorization; | |
| using Microsoft.AspNetCore.Mvc; | |
| using SCM.Application.Authentication; | |
| using SCM.Application.Authentication.Dtos; | |
| using SCM.Shared.Api; | |
| namespace SCM.Api.Controllers; | |
| /// <summary>Autenticação e emissão de tokens JWT.</summary> | |
| [] | |
| [] | |
| [] | |
| [] | |
| public sealed class AuthController : ControllerBase | |
| { | |
| private readonly IAuthService _authService; | |
| public AuthController(IAuthService authService) => _authService = authService; | |
| /// <summary>Autentica um usuário e retorna um token de acesso.</summary> | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| public async Task<ActionResult<LoginResponse>> Login( | |
| [] LoginRequest request, CancellationToken ct = default) | |
| => Ok(await _authService.LoginAsync(request, ct)); | |
| } | |