< Summary

Information
Class: Syki.Back.Auth.SkipUserRegisterAuthReqHandler
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Auth/SkipUserRegisterAuthRequirement.cs
Tag: 22_11348620282
Line coverage
33%
Covered lines: 1
Uncovered lines: 2
Coverable lines: 3
Total lines: 16
Line coverage: 33.3%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
HandleRequirementAsync(...)0%620%

File(s)

/home/runner/work/syki/syki/Back/Auth/SkipUserRegisterAuthRequirement.cs

#LineLine coverage
 1namespace Syki.Back.Auth;
 2
 3/// <summary>
 4/// Política de acesso à feature de "Logar sem cadastro".
 5/// </summary>
 6public class SkipUserRegisterAuthRequirement : IAuthorizationRequirement { }
 7
 18public class SkipUserRegisterAuthReqHandler(FeaturesSettings settings) : AuthorizationHandler<SkipUserRegisterAuthRequir
 9{
 10    protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, SkipUserRegisterAuthRequirement 
 11    {
 012        if (settings.SkipUserRegister) context.Succeed(requirement);
 13
 014        return Task.CompletedTask;
 15    }
 16}