We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
You can get the profile(s) of the authenticated user using the ProfileManager.
ProfileManager
>> Read the documentation of the ProfileManager component.
Example:
WebContext context = new JEEContext(request, response); ProfileManager manager = new ProfileManager(context); Optional<UserProfile> profile = manager.getProfile();
While you can build the JEEContext and the ProfileManager, you may also inject them.
JEEContext
First, you must register the components:
@ComponentScan(basePackages = "org.pac4j.springframework.component")
or
@Import(ComponentConfig.class)
Then, you can inject the ProfileManager (and the JEEContext):
@Autowired private ProfileManager profileManager;