Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correspondence client #897

Merged
merged 77 commits into from
Nov 21, 2024
Merged

Correspondence client #897

merged 77 commits into from
Nov 21, 2024

Conversation

danielskovli
Copy link
Contributor

@danielskovli danielskovli commented Nov 8, 2024

Description

This PR has perhaps become a bit large and unruly, but there were many interleaved concepts involved in this feature, which turned out to be difficult to separate.

Maskinporten

The MaskinportenClient has been extended to allow for a second (internal use) instance, and the possiblity of exchanging Maskinporten tokens for Altinn tokens. Some updates have been made to the data models which may be considered breaking changes.

I have also renamed HttpClientBuilderExtensions.UseMaskinportenAuthorization, but forwarded the legacy method to the new one. It's not clear to me if this is necessary or not -- it's extremely unlikely that anyone has started using this product yet.

Correspondence

The CorrespondenceClient and all associated logic/models/functionality is brand new. The implementation of this ecosystem is the main bulk of the PR.

The naming conventions for all things Correspondence could use a second pair of eyes. Perhaps especially the CorrespondenceRequestBuilder pattern naming.

Telemetry

The Telemetry class has been extended with a partial class for Correspondence, and CorrespondenceClient implements StartActivity and request counting. This does not cover all objectives in #832, so more work is likely needed in this area.

Misc

Certain data that has traditionally been "stringly typed" now has their own struct types: AccessToken, OrganisationNumber and LanguageCode. Implicit operators and JSON converters have been added where applicable for current use.

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
64.15% Condition Coverage on New Code (required ≥ 65%)

See analysis details on SonarQube Cloud

@danielskovli danielskovli merged commit 9cb9bc6 into main Nov 21, 2024
10 of 11 checks passed
@danielskovli danielskovli deleted the correspondence-client branch November 21, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Label Pull requests with new features. Used when generation releasenotes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants