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

BAH-4157 | Migrate HIP Initiated Linking Flow to use ABDM v3 APIs #181

Open
wants to merge 8 commits into
base: abdm-v3
Choose a base branch
from

Conversation

mohan-13
Copy link

This PR incorporates the following changes

  • v3 APIs for Link Token Generation is added.
  • Care Context Linking and Notify APIs are migrated to v3 APIs from v0.5 APIs
  • SMS Notification APIs are migrated to v3 APIs
  • Removed unused internal APIs for Link Care Context and Notify Care Context

break;
}
i++;
} while (i < gatewayConfiguration.Counter);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of a loop,can we consider an event-driven mechanism that waits asynchronously for updates to UserAuthMap?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach is taken consciously to keep it simple. Also, the execution needs to wait until we get a linking token to proceed with linking of care-context. This is added since to token comes on a callback response from gateway

}
var authConfirm = new AuthConfirm(healthId, accessToken);
var savedAuthConfirm = userAuthRepository.Get(healthId).Result;
if (savedAuthConfirm.Equals(Option.Some<AuthConfirm>(null)))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we not using simpler, clearer null-checks? Like,

if (savedAuthConfirm == null)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is checked in this way because the return for userAuthRepository.Get is always an Option instead of a null. So a simple null check would return false since the object would be initialised with an instance of Option having a null value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants