smolnar82 commented on a change in pull request #337:
URL: https://github.com/apache/knox/pull/337#discussion_r434880140
##########
File path:
gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/DefaultTokenAuthorityService.java
##########
@@ -177,11 +192,7 @@ public JWT issueToken(Principal p, List<String> audiences,
String algorithm, lon
}
private char[] getSigningKeyPassphrase(char[] signingKeyPassphrase) throws
AliasServiceException {
Review comment:
No longer throws `AliasServiceException`
##########
File path:
gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/DefaultTokenAuthorityService.java
##########
@@ -135,6 +138,25 @@ public JWT issueToken(Principal p, List<String> audiences,
String algorithm, lon
return issueToken(p, audiences, algorithm, expires, null, null, null);
}
+ private RSAPrivateKey getSigningKey(final String signingKeystoreName,
+ final String signingKeystoreAlias,
+ final char[] signingKeystorePassphrase)
+ throws KeystoreServiceException, TokenServiceException {
+
+ if (signingKeystorePassphrase != null) {
+ char[] passphrase;
+ try {
+ passphrase = getSigningKeyPassphrase(signingKeystorePassphrase);
+ } catch (AliasServiceException e) {
+ throw new TokenServiceException(e);
+ }
Review comment:
Since `getSigningKeyPassphrase` no longer throws `AliasServiceException
` -> the try/catch block is unnecesarry.
----------------------------------------------------------------
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]