< Summary - Syki

Information
Class: Syki.Front.Configs.AuthConfigs
Assembly: Front
File(s): /home/runner/work/syki/syki/Front/Configs/AuthConfigs.cs
Tag: 4_16869239191
Line coverage
0%
Covered lines: 0
Uncovered lines: 9
Coverable lines: 9
Total lines: 21
Line coverage: 0%
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
AddAuthConfigs(...)100%210%

File(s)

/home/runner/work/syki/syki/Front/Configs/AuthConfigs.cs

#LineLine coverage
 1using Microsoft.AspNetCore.Authorization;
 2using Microsoft.AspNetCore.Components.Authorization;
 3
 4namespace Syki.Front.Configs;
 5
 6public static class AuthConfigs
 7{
 8    public static void AddAuthConfigs(this WebAssemblyHostBuilder builder)
 9    {
 010        builder.Services.AddScoped<IAuthorizationHandler, CrossLoginAuthReqHandler>();
 11
 012        builder.Services.AddAuthorizationCore(options =>
 013        {
 014            options.AddPolicy(FrontPolicy.CrossLogin, p => p.Requirements.Add(new CrossLoginAuthReq()));
 015        });
 16
 017        builder.Services.AddScoped<AuthManager>();
 018        builder.Services.AddScoped<SykiAuthStateProvider>();
 019        builder.Services.AddScoped<AuthenticationStateProvider>(sp => sp.GetRequiredService<SykiAuthStateProvider>());
 020    }
 21}