< Summary - Syki

Information
Class: Syki.Back.Features.Identity.UpdateSsoConfiguration.UpdateSsoConfigurationController
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Identity/UpdateSsoConfiguration/UpdateSsoConfigurationController.cs
Tag: 97_27801654829
Line coverage
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
Total lines: 35
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%
Update()100%210%

File(s)

/home/runner/work/syki/syki/Back/Features/Identity/UpdateSsoConfiguration/UpdateSsoConfigurationController.cs

#LineLine coverage
 1namespace Syki.Back.Features.Identity.UpdateSsoConfiguration;
 2
 3[ApiController, Authorize(Policies.UpdateSsoConfiguration)]
 04public class UpdateSsoConfigurationController(UpdateSsoConfigurationService service) : ControllerBase
 5{
 6    /// <summary>
 7    /// Atualizar configuração SSO
 8    /// </summary>
 9    /// <remarks>
 10    /// Atualiza a configuração de Single Sign-On da instituição.
 11    /// </remarks>
 12    [HttpPut("identity/sso/configurations/{id:guid}")]
 13    [SwaggerResponseExample(200, typeof(ResponseExamples))]
 14    [SwaggerResponseExample(400, typeof(ErrorsExamples))]
 15    public async Task<IActionResult> Update([FromRoute] Guid id, [FromBody] UpdateSsoConfigurationIn data)
 16    {
 017        var result = await service.Update(id, data);
 018        return result.Match<IActionResult>(Ok, BadRequest);
 019    }
 20}
 21
 22internal class RequestExamples : ExamplesProvider<UpdateSsoConfigurationIn>;
 23internal class ResponseExamples : ExamplesProvider<UpdateSsoConfigurationOut>;
 24internal class ErrorsExamples : ErrorExamplesProvider<
 25    SsoConfigurationNotFound,
 26    InvalidSsoProviderType,
 27    InvalidSsoAuthority,
 28    InvalidSsoClientId,
 29    SsoAuthorityMustBeHttps,
 30    SsoAuthorityHasUserInfo,
 31    SsoAuthorityLocalhostNotAllowed,
 32    SsoAuthorityLoopbackNotAllowed,
 33    SsoAuthorityPrivateIpNotAllowed,
 34    SsoAuthorityLinkLocalNotAllowed
 35>;