Authorization Error with default authorizer and claimMapper

{“level”:“error”,“ts”:“2024-10-04T09:45:45.289Z”,“msg”:“Authorization error”,“error”:"token contains an invalid number of segments",“logging-call-at”:“interceptor.go:174”.

Does it mean the JWT token being used is not the correct format?

1 Like

I tried to intercept the JWT token from browser’s local storage and I can see that the JWT token has three parts ... Not sure why we are gettings this error.

Which format are you passing it in? See if info in docs here help and let us know.

Thanks for your reply @tihomir. Yes, we have followed the suggested format.
PFB token payload that I got from the browser,

I have set the permissionClaimName as per the JWT token.

1 Like

@tihomir From the network tab, I can see the Authorization-extra has the JWT token but the token in Authorization doesn’t look like a JWT token.

image

@tihomir I Forgot to mention this - I’m trying to enable authorization for temporal-ui and facing this issue. Do we need to use grant types as jwt-bearer when registering as client in OAuth?