Using pac4j-oidc without the org.springframework:spring-core dependency

7 views
Skip to first unread message

Raphael Kollmann

unread,
Feb 24, 2026, 9:56:55 AMFeb 24
to Pac4j development mailing list
Hi,

we would like to use pac4j-oidc in our application. However, the pac4j-oidc module pulls in a dependency on org.springframework:spring-core, which we need to avoid.
From what I understand, Spring is only used for handling the resource (OIDCProviderMetadata) in the org.pac4j.oidc.metadata.OidcOpMetadataResolver class. Although org.pac4j.oidc.metadata.StaticOidcOpMetadataResolver allows handling the OIDCProviderMetadata manually, it still extends OidcOpMetadataResolver and therefore still depends on Spring.

Is there a way to use pac4j-oidc without the spring-core dependency?
Or would it be possible to refactor OidcOpMetadataResolver (or StaticOidcOpMetadataResolver) to remove the Spring dependency?

Best regards,
Raphael

Jérôme LELEU

unread,
Feb 24, 2026, 12:46:23 PMFeb 24
to Raphael Kollmann, Pac4j development mailing list
Hi,

Currently, you can't use pac4j-oidc without spring-core because of the metadata resolver chain.
You're right, the design is strongly coupled between Spring and OIDC while this is not necessary for the StaticOidcOpMetadataResolver.

It could be certainly refactored, but I don't think the refactoring is easy as Spring methods and OIDC methods are messed up.

Thanks.
Best regards,
Jérôme



--
You received this message because you are subscribed to the Google Groups "Pac4j development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pac4j-dev+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pac4j-dev/22111086-e7ec-4de6-a68e-4b5540a6d130n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages