-
Notifications
You must be signed in to change notification settings - Fork 290
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't get policies: audience error. #402
Comments
Quick update: I changed how the library behaves when checking the audience, haven't done any real work to test and validate. So I won't call it a "solution". Also, I'm not sure how much this change bellow would impact the rest of the library:
Then, I provide the intended audience ( keycloak/keycloak#14398 -- this is more or less my situation and one of the replies mention the Cheers! |
found a workaround here |
The error you're encountering seems to be related to how you are decoding and validating a JWT token using the PyJWT library in Python. The error messages are indicating problems with the audience (aud) claim in the JWT. The issue appears to be in the validation of the audience, which doesn't match what you expected. To resolve this issue, follow these steps: 1.Review Audience (aud) Claim: 2.Check Token Payload: 3.Ensure Proper Token Signing Algorithm: Check Token Issuer (iss) Claim: Verify Token in Keycloak: |
Hello, everyone!
I'm trying to use the
get_policies
function, but I'm getting errors related with the Audience. I cannot find where in Keycloak I set them, so I'm not able to see if they are doubled (one of the errors says there are too many audiences). It maybe a problem with my configuration, but could be a bug too. Nevertheless, here is how I'm doing it:These are the errors:
The two commands bellow they also crashes:
policies = keycloak_openid.get_policies( ..., audience="account", ...) # same error as above
and without the
audience
parameter it crashes with the error bellow:Any help is appreciated! Cheers!
The text was updated successfully, but these errors were encountered: