mike-jumper commented on a change in pull request #564:
URL: https://github.com/apache/guacamole-client/pull/564#discussion_r528175729
##########
File path:
extensions/guacamole-auth-openid/src/main/java/org/apache/guacamole/auth/openid/token/TokenValidationService.java
##########
@@ -55,24 +59,24 @@
@Inject
private NonceService nonceService;
+ private static final String MSG_REJECTED_TOKEN = "Rejected OpenID token
with malformed claim: {}";
+ private static final String MSG_MALFORMED_CLAIM = "Malformed claim within
received JWT.";
Review comment:
What's the reasoning behind moving these log messages into constants?
I'm wary of this because:
* The usage of `MSG_REJECTED_TOKEN` must be aware of the fact that it uses
parameter substitution with `{}` (as well as the context of that `{}`).
Likewise, the usage of `MSG_MALFORMED_CLAIM` must be aware that parameter
substitution is _not_ used.
* The constants seem unlikely to be reused.
* The human-readable message can sometimes be useful when reading the
source, as they provide context, but they are no longer readily readable in the
vicinity of the relevant code.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]