Skip to content

Fixes 31191 Duplicated Scopes - #31290

Closed
0x006EA1E5 wants to merge 1 commit into
Azure:mainfrom
0x006EA1E5:another-fix-for-31191-duplicated-scopes
Closed

Fixes 31191 Duplicated Scopes#31290
0x006EA1E5 wants to merge 1 commit into
Azure:mainfrom
0x006EA1E5:another-fix-for-31191-duplicated-scopes

Conversation

@0x006EA1E5

@0x006EA1E5 0x006EA1E5 commented Oct 6, 2022

Copy link
Copy Markdown

Description

  • Call addParametersConverter(...) and addHeadersConverter(...) in constructor of AbstractOAuth2AuthorizationCodeGrantRequestEntityConverter instead of convert(...) method
  • Ensure AadRestTemplateCreator.createOAuth2AccessTokenResponseClientRestTemplate(...) only contains FormHttpMessageConverter and OAuth2AccessTokenResponseHttpMessageConverter

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

* Call addParametersConverter(...) and addHeadersConverter(...) in constructor of AbstractOAuth2AuthorizationCodeGrantRequestEntityConverter instead of convert(...) method
* Ensure AadRestTemplateCreator.createOAuth2AccessTokenResponseClientRestTemplate(...) only contains FormHttpMessageConverter and OAuth2AccessTokenResponseHttpMessageConverter
@ghost

ghost commented Oct 6, 2022

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@ghost ghost added azure-spring All azure-spring related issues customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Oct 6, 2022
@ghost

ghost commented Oct 6, 2022

Copy link
Copy Markdown

Thank you for your contribution 0x006EA1E5! We will review the pull request and get back to you soon.

@chenrujun chenrujun self-assigned this Oct 8, 2022
@chenrujun chenrujun added bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. labels Oct 8, 2022
@chenrujun chenrujun added this to the 2022-11 milestone Oct 8, 2022
private static final TypeReference<Map<String, OAuth2AuthorizedClient>> TYPE_REFERENCE =
new TypeReference<Map<String, OAuth2AuthorizedClient>>() {
};
new TypeReference<>() {};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

authorizedClientsMap.put(authorizedClient.getClientRegistration().getRegistrationId(), authorizedClient);
request.getSession().setAttribute(AUTHORIZED_CLIENTS_ATTR_NAME,
serializeOAuth2AuthorizedClientMap(authorizedClients));
serializeOAuth2AuthorizedClientMap(Collections.unmodifiableMap(authorizedClientsMap)));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good point. This will make the code more robust.

@chenrujun

Copy link
Copy Markdown

Closing this PR in favor of #31213

@chenrujun chenrujun closed this Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

azure-spring All azure-spring related issues bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants