I have a direct header client (using OpenID Connect) like this:
OidcConfiguration config = new OidcConfiguration();
config.setClientId(clientId);
config.setSecret(secret);
config.setDiscoveryURI(discoveryUri);
// additional settings of config
OidcClient oidcClient = new OidcClient(config);
OidcProfileCreator profileCreator = new OidcProfileCreator(config, oidcClient);
HeaderClient client = new HeaderClient("my-custom-header", "my-custom-prefix", profileCreator);
Authentication/ validation of the token works fine. The problem I have is in the OidcProfileCreator
. The OidcProfileCreator
never sets the ID in the UserProfile. The ID is set when there are OidcCredentials
but not when there are TokenCredentials
(see OidcProfileCreator.java:118). Why is that? Shouldn’t the ID of the UserProfile be set by the JWT subject (sub
) as well when there are token credentials?
I was expecting the created UserProfile to have the JWS claim sub
(subject) to be set as the ID of the org.pac4j.core.profile.UserProfile
.
I am using pac4j 5.7.3. But the profile creator acts the same in the current version.
Kind regards