Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not disable verifyNonce when dealing with JWT claims #28

Closed
bghenne opened this issue Jan 9, 2023 · 3 comments
Closed

Can not disable verifyNonce when dealing with JWT claims #28

bghenne opened this issue Jan 9, 2023 · 3 comments

Comments

@bghenne
Copy link

bghenne commented Jan 9, 2023

Hello,

I'm calling an Open ID Connect which does not provide "nonce" into JWT claims inside the token.
Warning: Undefined property: stdClass::$nonce

This does give me an error inside OidcJwtHelper::verifyJwtClaims method as it's called through OidcClient::authenticate method without the possibility of specifying parameter verifyNonce to set it to false.

// Request and verify the tokens return $this->verifyTokens( $this->requestTokens('authorization_code', $code, $this->getRedirectUrl()) );

So I dag a little bit and tried to create my own client but was not able to make it replace the default one.

I must say that I'm not particularly familiar with security stuffs into Symfony.
Can you please tell me what I'm doing wrong ?

Thanks.
Benjamin.

PS : Please find attached my configuration files.
drenso_oidc.yaml.txt
security.yaml.txt

@bobvandevijver
Copy link
Member

The issue you have is because this bundle currently requires the nonce to be used and returned by the IdP. Replacing the complete client should be possible using the Symfony container by replacing the service id, but it is probably a lot easier to add an option to this bundle to disable the nonce completely. Would you be open to create a PR for that?

@bghenne
Copy link
Author

bghenne commented Jan 11, 2023

There you have : #30

Thank you.

@bobvandevijver
Copy link
Member

Closed with #30.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants