fix(jwt-policy): local-style URLs should be accepted by UrlValidator
MODIFY
jwt-policy/src/main/java/io/apiman/plugins/jwt/JWTPolicy.java
jwt-policy/src/main/java/io/apiman/plugins/jwt/JWTPolicy.java
@@ -51,7 +51,7 @@ public class JWTPolicy extends AbstractMappedPolicy<JWTPolicyBean> {
private static final String BEARER = "bearer "; //$NON-NLS-1$
private static final PolicyFailureFactory FAILURE_FACTORY = PolicyFailureFactory.getInstance();
private static final String[] schemes = {"http","https"};
- private static final UrlValidator urlValidator = new UrlValidator(schemes);
+ private static final UrlValidator urlValidator = new UrlValidator(schemes, UrlValidator.ALLOW_LOCAL_URLS);
private JwkProvider provider = null;
@Override

MODIFY
jwt-policy/src/main/java/io/apiman/plugins/jwt/beans/JWTPolicyBean.java
jwt-policy/src/main/java/io/apiman/plugins/jwt/beans/JWTPolicyBean.java
@@ -275,7 +275,7 @@ public class JWTPolicyBean {
public void setSigningKeyString(String signingKeyString) throws Exception {
if (signingKey == null) {
String[] schemes = {"http","https"};
- UrlValidator urlValidator = new UrlValidator(schemes);
+ UrlValidator urlValidator = new UrlValidator(schemes, UrlValidator.ALLOW_LOCAL_URLS);
// If it is a jwk(s) url we don't set the signingKey
if (!urlValidator.isValid(signingKeyString)) {
signingKey = PemUtils.decodePublicKey(signingKeyString);

fix(jwt-policy): local-style URLs should be accepted by UrlValidator