< Summary - Syki

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

File(s)

/home/runner/work/syki/syki/Back/Features/Identity/Logout/LogoutController.cs

#LineLine coverage
 1using Syki.Back.Domain.Identity;
 2
 3namespace Syki.Back.Features.Identity.Logout;
 4
 5[ApiController, Authorize(Policies.Logout)]
 246public class LogoutController(SignInManager<SykiUser> signInManager, AuthSettings settings) : ControllerBase
 7{
 8    /// <summary>
 9    /// Logout
 10    /// </summary>
 11    /// <remarks>
 12    /// Realiza logout no sistema.
 13    /// </remarks>
 14    [HttpPost("identity/logout")]
 15    public async Task<IActionResult> Logout()
 16    {
 2417        Response.DeleteJWTCookie(settings);
 2418        await signInManager.SignOutAsync();
 19
 2420        return Ok();
 2421    }
 22}