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

Feature/488068 auth common backend and accounts apis #37

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hyadaveviden
Copy link
Collaborator

handler for calling Common backend and Accounts APIs

@hyadaveviden hyadaveviden requested a review from a team as a code owner January 10, 2025 09:09
@@ -12,4 +12,5 @@ public class Service
public int? Retries { get; set; }
public string? PrnBaseUrl { get; set; }
public string? PrnEndPointName { get; set; }
public string? ClientId { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

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

We will need 2 client Id's one for Prn Service and one for account service.

services.AddHttpClient(Common.Constants.HttpClientNames.Npwd)
.AddHttpMessageHandler<NpwdOAuthMiddleware>();
services.AddHttpClient(Common.Constants.HttpClientNames.Npwd).AddHttpMessageHandler<NpwdOAuthMiddleware>();
services.AddHttpClient(Common.Constants.HttpClientNames.Prn).AddHttpMessageHandler<PrnServiceAuthorisationHandler>();
Copy link
Contributor

Choose a reason for hiding this comment

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

You have named this client but where this has been used?

{
if (!string.IsNullOrEmpty(config.Value.ClientId))
{
_tokenRequestContext = new TokenRequestContext([config.Value.ClientId]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we have single handler for two service we need to get token for both services. We discussed this yesterday

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.

4 participants