Retrieving permissions in Spring boot

Hi,

I have a Spring boot backend built on the example in the documentation. Itis validating the JWT from Auth0. Everything works OK except that I cannot convert the permissions claim to Authorities. It works well reading from the scope claim.
I found a similar post last year which suggested that the permissions are injected into the scope. I do not find that satisfactory as the scope has a separate purpose other than contain permissions. Has anybody got any other solutions to this?

Kind regards

Malcolm