I am getting the following error message when trying to authenticate using JWT.
Now, on its face, this error is that I need to set the aud parameter in my JWT to a string - ok, I get that.
However, my IAM, Keycloak, is providing the following:
"aud": [
"broker",
"account"
],
Should I be manually changing this to only one of these values? I'm not quite sure what audience does and if I'd be losing information if I just decide to get rid of one of the values.
From my reading:
The audience aud claim in a JWT is meant to refer to the Resource Servers that should accept the token.
I don't think I need either broker or account - how would I change them to something else - a string value?
EDIT:
I just want to set "aud" to a single string value in keycloak. That's it.
EDIT2:
Both the Audience and Audience Resolve protocol mappers add the audiences just to the access token by default. The ID Token typically contains only single audience, which is the client ID of the client for which the token was issued. This is a requirement of the OpenID Connect specification. On the other hand, the access token does not necessarily have the client ID of the client, which was the token issued for, unless any of the audience mappers added it.