zeroflag commented on code in PR #554:
URL: https://github.com/apache/knox/pull/554#discussion_r849266857
##########
gateway-server/src/test/java/org/apache/knox/gateway/services/token/impl/DefaultTokenStateServiceTest.java:
##########
@@ -369,16 +370,7 @@ protected TokenStateService createTokenStateService()
throws Exception {
/* create a test JWT token */
protected JWT getJWTToken(final long expiry) {
- String[] claims = new String[6];
- claims[0] = "KNOXSSO";
- claims[1] = "[email protected]";
- claims[2] = "https://login.example.com";
- if(expiry > 0) {
- claims[3] = Long.toString(expiry);
- }
- claims[4] = "E0LDZulQ0XE_otJ5aoQtQu-RnXv8hU-M9U4dD7vDioA";
- claims[5] = null;
- JWT token = new JWTToken("RS256", claims);
+ JWT token = new JWTToken(new
JWTokenAttributesBuilder().setExpires(expiry).setAlgorithm("RS256").build());
Review Comment:
Putting it back or removing it makes no difference. These attributes are not
checked in this test. `JWTTokenTest` covers the attribute checks.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]