Skip to content

Conversation

@jreynard-code
Copy link
Member

No description provided.

Copy link
Contributor

@vcarluer vcarluer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


if (authentication is JwtAuthenticationToken) {
return authentication.token.tokenValue.let {
JWTParser.parse(it).jwtClaimsSet.getStringClaim(configuration.authorization.mailJwtClaim)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is present 2 times :
JWTParser.parse(it).jwtClaimsSet.getStringClaim(configuration.authorization.mailJwtClaim)
To refactor? Maybe with when

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, will change it (certainly) use when syntax when we'll integrate Keycloak as identity provider ;)


if (authentication is JwtAuthenticationToken) {
return authentication.token.tokenValue.let {
JWTParser.parse(it).jwtClaimsSet.getStringListClaim(configuration.authorization.rolesJwtClaim)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same, like before, line 2 times: JWTParser.parse(it).jwtClaimsSet.getStringListClaim(configuration.authorization.rolesJwtClaim)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, will change it (certainly) use when syntax when we'll integrate Keycloak as identity provider ;)

@jreynard-code jreynard-code merged commit f34eb20 into main May 16, 2023
@jreynard-code jreynard-code deleted the JREY/fix_jwt_token_admin_check branch May 16, 2023 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants