< Summary - Syki

Information
Class: Syki.Back.Features.Identity.EmailPasswordLogin.EmailPasswordLoginController
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Identity/EmailPasswordLogin/EmailPasswordLoginController.cs
Tag: 56_26538939494
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 28
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
Login()100%11100%

File(s)

/home/runner/work/syki/syki/Back/Features/Identity/EmailPasswordLogin/EmailPasswordLoginController.cs

#LineLine coverage
 1namespace Syki.Back.Features.Identity.EmailPasswordLogin;
 2
 3[ApiController, EnableRateLimiting(RateLimitingConfigs.SensitivePolicy)]
 624public class EmailPasswordLoginController(EmailPasswordLoginService service) : ControllerBase
 5{
 6    /// <summary>
 7    /// Email + Password Login 🔓
 8    /// </summary>
 9    /// <remarks>
 10    /// Realiza login no sistema.
 11    /// </remarks>
 12    [HttpPost("identity/email-password-login")]
 13    [SwaggerResponseExample(200, typeof(ResponseExamples))]
 14    [SwaggerResponseExample(400, typeof(ErrorsExamples))]
 15    public async Task<IActionResult> Login([FromBody] EmailPasswordLoginIn data)
 16    {
 6217        var result = await service.Login(data);
 6218        return result.Match<IActionResult>(Ok, BadRequest);
 6219    }
 20}
 21
 22internal class RequestExamples : ExamplesProvider<EmailPasswordLoginIn>;
 23internal class ResponseExamples : ExamplesProvider<EmailPasswordLoginOut>;
 24internal class ErrorsExamples : ErrorExamplesProvider<
 25    LoginRequiresTwoFactor,
 26    LoginUserLockedOut,
 27    LoginWrongEmailOrPassword
 28>;