--
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/c94def84-8bfb-4dc0-854c-53fc2fadd9e8n%40googlegroups.com.
Hi,
I have the same issue with this IdP : https://demo.duendesoftware.com/ which doesn't return a nonce in the refreshed id_token.
I want try to help for this issue.
It is not easy to check the nonce if present because in the org.pac4j.oidc.profile.creator.TokenValidator#validate method, there is only the token and the validator, and the idTokenValidator is an external code, hard to change it.
I thought about a configuration.isUseNonceOnRefresh() to use here https://github.com/pac4j/pac4j/blob/master/pac4j-oidc/src/main/java/org/pac4j/oidc/profile/creator/OidcProfileCreator.java#L118 to activate or not the nonce check.
I could add a credentials.setRefreshedCredentials(true) flag after refreshing the credentials un OidcClient.renewUserProfile method here :
Then in the OidcProfileCreator#create(final CallContext ctx, final Credentials credentials) method, if the credentials.isRefreshedCredentials() and configuration.isUseNonceOnRefresh(), I will set nonce = null
Are you ok with that ?
Best regards,
Alexandre
To view this discussion visit https://groups.google.com/d/msgid/pac4j-dev/6fc24bf9-5cb8-4a14-93ed-64fc9bf795a4n%40googlegroups.com.