conjur-api-dotnet icon indicating copy to clipboard operation
conjur-api-dotnet copied to clipboard

Cleanup and add async methods

Open emanueldejanu opened this issue 8 months ago • 4 comments

Desired Outcome

Make the code more readable and use some new language syntax. Add async methods. Allow HttpClient to be created outside of Client class to be able to use IHttpClientFactory in ASP.NET applications.

Ignore spaces changes will help with review.

When you review select to ignore whitespace changes.

Connected Issue/Story

Resolves #[relevant GitHub issue(s), e.g. 76]

CyberArk internal issue ID: [insert issue ID]

Definition of Done

At least 1 todo must be completed in the sections below for the PR to be merged.

Changelog

  • [ ] The CHANGELOG has been updated, or
  • [ ] This PR does not include user-facing changes and doesn't require a CHANGELOG update

Test coverage

  • [ X] This PR includes new unit and integration tests to go with the code changes, or
  • [ ] The changes in this PR do not require tests

Documentation

  • [ ] Docs (e.g. READMEs) were updated in this PR
  • [ ] A follow-up issue to update official docs has been filed here: [insert issue ID]
  • [ ] This PR does not require updating any documentation

Behavior

  • [ ] This PR changes product behavior and has been reviewed by a PO, or
  • [ ] These changes are part of a larger initiative that will be reviewed later, or
  • [ ] No behavior was changed with this PR

Security

  • [ ] Security architect has reviewed the changes in this PR,
  • [ ] These changes are part of a larger initiative with a separate security review, or
  • [ ] There are no security aspects to these changes

emanueldejanu avatar Apr 24 '25 00:04 emanueldejanu

All new async methods that had tests for synchronous methods are covered by tests:

image

I was not able to run AWSIAMAuthenticatorTest, so maybe you can test before merge it, as synchronous method is using the async method it will be covered by existing test.

emanueldejanu avatar Apr 24 '25 08:04 emanueldejanu

I also want to switch to System.Text.Json instead of DataContractJsonSerializer, but maybe in other PR.

emanueldejanu avatar Apr 24 '25 08:04 emanueldejanu

Wow, thank you for the PR @emanueldejanu! Either I or one of my teammates will take a look at this soon. Since it's a large PR it may take us some time but we'll keep you posted. Thank you!

szh avatar Apr 24 '25 13:04 szh

Tracking internally as CNJR-9409

szh avatar Apr 25 '25 14:04 szh

Thank you for your patience on this. I'm actively reviewing this and you can expect a review shortly.

szh avatar Sep 03 '25 18:09 szh

Merged in v3.1.0! Thank you again so much for your contribution! bb3aaeac2c247f97d13f48d401e529153c7d71bb

szh avatar Sep 16 '25 13:09 szh