quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.88k stars 2.71k forks source link

`JsonWebToken.getGroups` fails in `quarkus-oidc` if the `groups` claim is a string #21100

Open sberyozkin opened 3 years ago

sberyozkin commented 3 years ago

Describe the bug

JsonWebToken.getGroups returns a Set and quarkus-oidc fails to convert a groups string claim to Set in this case - it works in smallrye-jwt though.

It is a really minor issue - as JsonWebToken.getGroups is not really required to support single string claims - but JSON arrays of strings - and it is possible to do JsonWebToken.getClaim("groups"); it is also correctly mapped to SecurityIdentity.getRoles so calling JsonWebToken.getGroups in quarkus-oidc is not needed in most cases.

@andreas-eberle has spotted it

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

quarkus-bot[bot] commented 3 years ago

/cc @pedroigor