< Summary - Syki

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

File(s)

/home/runner/work/syki/syki/Back/Features/Identity/CreateSsoConfiguration/CreateSsoConfigurationController.cs

#LineLine coverage
 1namespace Syki.Back.Features.Identity.CreateSsoConfiguration;
 2
 3[ApiController, Authorize(Policies.CreateSsoConfiguration)]
 04public class CreateSsoConfigurationController(CreateSsoConfigurationService service) : ControllerBase
 5{
 6    /// <summary>
 7    /// Criar configuração SSO
 8    /// </summary>
 9    /// <remarks>
 10    /// Cria uma nova configuração de Single Sign-On (SSO) para a instituição.
 11    /// </remarks>
 12    [HttpPost("identity/sso/configurations")]
 13    [SwaggerResponseExample(200, typeof(ResponseExamples))]
 14    [SwaggerResponseExample(400, typeof(ErrorsExamples))]
 15    public async Task<IActionResult> Create([FromBody] CreateSsoConfigurationIn data)
 16    {
 017        var result = await service.Create(data);
 018        return result.Match<IActionResult>(Ok, BadRequest);
 019    }
 20}
 21
 22internal class RequestExamples : ExamplesProvider<CreateSsoConfigurationIn>;
 23internal class ResponseExamples : ExamplesProvider<CreateSsoConfigurationOut>;
 24internal class ErrorsExamples : ErrorExamplesProvider<
 25    InvalidSsoProviderType,
 26    InvalidSsoAuthority,
 27    InvalidSsoClientId,
 28    InvalidSsoClientSecret,
 29    SsoAuthorityMustBeHttps,
 30    SsoAuthorityHasUserInfo,
 31    SsoAuthorityLocalhostNotAllowed,
 32    SsoAuthorityLoopbackNotAllowed,
 33    SsoAuthorityPrivateIpNotAllowed,
 34    SsoAuthorityLinkLocalNotAllowed,
 35    SsoDomainAlreadyConfigured
 36>;