-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove delegation check + use new create endpoint WIP * remove dead code * add problemDetails mapper * fix warnings + remove dead code * fix warning * return 404 if request is not found * show specific error message for request id not found * fix return type * add translations for delegation errors * move parameter to pathname * fix texts * remove PDP mock + old dependencies * improve msw mock code + change mock to typescript * fix after change in backend * update problem mapping * fixes * temp test fix * minor size change * remove logging information message * add problem detail for non-existing system * show error message if system is not found * test for not existing system * add Authorize attribute back * fix error message mapping
- Loading branch information
Showing
47 changed files
with
996 additions
and
1,206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...c/Altinn.Authentication.UI/Altinn.Authentication.UI.Core/Common/Problems/ProblemMapper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Altinn.Authorization.ProblemDetails; | ||
|
||
namespace Altinn.Authentication.UI.Core.Common.Problems; | ||
/// <summary> | ||
/// Problem descriptors for the Authentication UI BFF. | ||
/// </summary> | ||
public static class ProblemMapper | ||
{ | ||
public static ProblemDescriptor MapToAuthUiError(string? authErrorCode) | ||
{ | ||
return authErrorCode switch | ||
{ | ||
"AUTH-00001" => Problem.Rights_NotFound_Or_NotDelegable, | ||
"AUTH-00002" => Problem.Rights_FailedToDelegate, | ||
"AUTH-00003" => Problem.SystemUser_FailedToCreate, | ||
"AUTH-00004" => Problem.SystemUser_AlreadyExists, | ||
"AUTH-00011" => Problem.SystemIdNotFound, | ||
"AUTH-00014" => Problem.UnableToDoDelegationCheck, | ||
"AUTH-00016" => Problem.DelegationRightMissingRoleAccess, | ||
"AUTH-00018" => Problem.DelegationRightMissingDelegationAccess, | ||
"AUTH-00019" => Problem.DelegationRightMissingSrrRightAccess, | ||
"AUTH-00020" => Problem.DelegationRightInsufficientAuthenticationLevel, | ||
_ => Problem.Generic_EndOfMethod, | ||
}; | ||
} | ||
} |
21 changes: 0 additions & 21 deletions
21
...n.Authentication.UI/Altinn.Authentication.UI.Core/Common/Rights/DelegationCheckRequest.cs
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
...nn.Authentication.UI/Altinn.Authentication.UI.Core/Common/Rights/DelegationCheckResult.cs
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
...Altinn.Authentication.UI/Altinn.Authentication.UI.Core/Common/Rights/DelegationRequest.cs
This file was deleted.
Oops, something went wrong.
27 changes: 0 additions & 27 deletions
27
...n.Authentication.UI/Altinn.Authentication.UI.Core/Common/Rights/DelegationResponseData.cs
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...rc/Altinn.Authentication.UI/Altinn.Authentication.UI.Core/Common/Rights/RightResponses.cs
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
...ication.UI/Altinn.Authentication.UI.Core/SystemUsers/CreateSystemUserRequestToAuthComp.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.