< Summary - Syki

Information
Class: Syki.Back.Features.Identity.TwoFactorLogin.TwoFactorLoginController
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Identity/TwoFactorLogin/TwoFactorLoginController.cs
Tag: 56_26538939494
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 27
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/TwoFactorLogin/TwoFactorLoginController.cs

#LineLine coverage
 1namespace Syki.Back.Features.Identity.TwoFactorLogin;
 2
 3[ApiController, EnableRateLimiting(RateLimitingConfigs.SensitivePolicy)]
 404public class TwoFactorLoginController(TwoFactorLoginService service) : ControllerBase
 5{
 6    /// <summary>
 7    /// 2FA Login
 8    /// </summary>
 9    /// <remarks>
 10    /// Realiza login utilizando o token 2FA.
 11    /// </remarks>
 12    [HttpPost("identity/2fa-login")]
 13    [SwaggerResponseExample(200, typeof(ResponseExamples))]
 14    [SwaggerResponseExample(400, typeof(ErrorsExamples))]
 15    public async Task<IActionResult> Login([FromBody] TwoFactorLoginIn data)
 16    {
 4017        var result = await service.Login(data);
 4018        return result.Match<IActionResult>(Ok, BadRequest);
 4019    }
 20}
 21
 22internal class RequestExamples : ExamplesProvider<TwoFactorLoginIn>;
 23internal class ResponseExamples : ExamplesProvider<TwoFactorLoginOut>;
 24internal class ErrorsExamples : ErrorExamplesProvider<
 25    InvalidTwoFactorToken,
 26    LoginIpNotAllowed
 27>;