spring-security-pac4j custom SpringSecurityHelper

31 views
Skip to first unread message

vishal gaurav

unread,
Nov 27, 2022, 9:33:46 AM11/27/22
to Pac4j users mailing list
Hi,
I am using spring-security-pac4j and wanted to customize the GrantedAuthority. But It seems there is no way we can extend  SpringSecurityHelper OR SpringSecurityProfileManager to provide Our own implementation.
Can we still override Context by replacing values ? I am not able to figure out right place to do it.

vishal gaurav

unread,
Nov 28, 2022, 8:00:33 AM11/28/22
to Pac4j users mailing list
I am using spring-security-pac4j : 5.1.0

vishal gaurav

unread,
Nov 28, 2022, 8:04:39 AM11/28/22
to Pac4j users mailing list
I see the code in SecurityFilter

static {
Config.setProfileManagerFactory("SpringSecurityProfileManager", (ctx) -> {
return new SpringSecurityProfileManager(ctx);
});
Config.setProfileManagerFactory2("SpringSecurityProfileManager2", (ctx, store) -> {
return new SpringSecurityProfileManager(ctx, store);
});
}

Looks like I can override in pac4j Config.

Jérôme LELEU

unread,
Nov 29, 2022, 9:47:52 AM11/29/22
to vishal gaurav, Pac4j users mailing list
Hi,

Indeed, this is what you should do with your own ProfileManager.
Thanks.
Best regards,
Jérôme



--
You received this message because you are subscribed to the Google Groups "Pac4j users mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pac4j-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pac4j-users/c497a9ff-10a0-4f19-af9e-e1acea8c3e56n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages