Dynamic Scopes for pac4j JEE based application POC

35 views
Skip to first unread message

rithvik pala

unread,
Aug 10, 2023, 11:52:58 AM8/10/23
to Please use https://stackoverflow.com with the pac4j tag

Hii,


Currently I am using Pac4j jee-pac4j.version 5.0.1-SNAPSHOT in JAVA 8 , I have a scenario where I need to inject the scope externally to test my application with different scope settings passed through a UI.

Is there any possible way i can do this.

GitHub Project refered

Can you please suggest me a solution for the same.

I tried extending DemoConfigFactory Class and setScope for each client retriving them through config:

configFactory.build("openid profile").getClients().getClients().forEach(client -> { if (client instanceof GoogleOidcClient) { GoogleOidcClient oidcClient = (GoogleOidcClient) client; oidcClient.getConfiguration().setScope(selectedScope); } });

its not adding the scopes or updating in the Configuration.



Required help on this if pac4j supports Dynamic scopes for this POC.


Regards

Rajat D

rithvik pala

unread,
Aug 15, 2023, 1:15:58 PM8/15/23
to Please use https://stackoverflow.com with the pac4j tag
Hi Thanks for the solution, I have configured the scopes at XXXConfigFactory but Actually I had a requirement for my client application to pass the scopes dynamically with each request ,so is there a workaround for the same , any class i can extend or implement so that i could add the scopes and update the Existing configuration?

Can anyone help me on this??

Reply all
Reply to author
Forward
0 new messages