Skip to content

updated multi-tenancy example to add TenantRepository and corrected t… #7643

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

Closed
wants to merge 1 commit into from
Closed

updated multi-tenancy example to add TenantRepository and corrected t… #7643

wants to merge 1 commit into from

Conversation

alexandre-melard
Copy link

Corrected some typos in the documentation and added an example TenantRepository

@pivotal-issuemaster
Copy link

@mylen Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster
Copy link

@mylen Thank you for signing the Contributor License Agreement!

Copy link
Contributor

@jzheaux jzheaux left a comment

Choose a reason for hiding this comment

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

Thank you for the documentation improvements, @alexandre-melard! I've left some feedback inline.

@@ -1273,13 +1296,13 @@ public class TenantAuthenticationManagerResolver implements AuthenticationManage

@Override
public AuthenticationManager resolve(HttpServletRequest request) {
return this.authenticationManagers.computeIfAbsent(toTenant(request), this::fromTenant); <3>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this removed? It should be linked to the <3> in the comments below.

Copy link
Author

Choose a reason for hiding this comment

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

I see... The reference was aimed at the two lines. I thought it was just aimed at the second code referenced. My bad!

[source,java]
----
@Component
public class TenantRepository {
Copy link
Contributor

Choose a reason for hiding this comment

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

I see your point in adding this sample TenantRepository. But, I think this demonstrates actually that it would be better to change the classes below to simply use a pair of Maps.

Would you mind changing the examples to use a Map<String, String> instead? Then, the members might be called issuersByTenant and jwkUrisByTenant instead of tenants or tenantRepository.

@@ -1258,6 +1258,29 @@ http
Resolving the tenant by claim is similar to doing so by request material.
The only real difference is the `toTenant` method implementation:

[source,java]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this snippet might be in the wrong place. Note the previous sentence, which is introducing the code snippet that is now below this one. I think we'd need to change the description a bit, too, for the reader to be able to follow.

@jzheaux jzheaux added in: docs An issue in Documentation or samples type: enhancement A general enhancement status: waiting-for-feedback We need additional information before we can continue and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 15, 2019
@jzheaux
Copy link
Contributor

jzheaux commented Nov 21, 2019

@alexandre-melard Are you able to apply the requested changes?

@alexandre-melard
Copy link
Author

alexandre-melard commented Nov 22, 2019 via email

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Nov 22, 2019
@jzheaux jzheaux added status: waiting-for-feedback We need additional information before we can continue and removed status: feedback-provided Feedback has been provided labels Dec 3, 2019
@jzheaux
Copy link
Contributor

jzheaux commented Jan 30, 2020

This is actually obsolete now since #7733 was merged. However, @alexandre-melard, feel free to take a look at the existing docs and see if you'd like to make any more improvements!

@jzheaux jzheaux closed this Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: docs An issue in Documentation or samples status: waiting-for-feedback We need additional information before we can continue type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants