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

Fix #3425 jooby-pac4j module: set config for ProfileManager in Pac4jC… #3427

Merged
merged 2 commits into from
May 19, 2024

Conversation

tkarlinski
Copy link
Contributor

Fix renewing the Profile in the jooby-pac4j module by setting the configuration for the ProfileManager in Pac4jCurrentUser.

Copy link
Member

@jknack jknack left a comment

Choose a reason for hiding this comment

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

Looks good, let's make one more change.

@@ -581,7 +581,7 @@ public void install(@NonNull Jooby application) throws Exception {
});
}
/** Set current user provider */
application.setCurrentUser(new Pac4jCurrentUser());
application.setCurrentUser(new Pac4jCurrentUser(pac4j));
Copy link
Member

Choose a reason for hiding this comment

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

Let's make the pac4j configuration accesible by adding to registry:

application.getServices().put(Config.class, pac4j);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK. I added the configuration to the registry at the end of the install method because above, the configuration can be changed

@jknack jknack added this to the 3.1.1 milestone May 19, 2024
@jknack jknack merged commit 40876aa into jooby-project:3.x May 19, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants