protected Function<Resource, Key> createResourceKeyFunction(Resource keyResource, boolean keyStringSpecified) { if (!isClassAvailable("org.bouncycastle.openssl.PEMParser")) { String msg = "The org.bouncycastle:bcpkix-jdk15on:1.56 artifact (or newer) must be in the " + "classpath to be able to parse the " + (keyStringSpecified ? "juiser.header.jwt.key.value PEM-encoded value" : "juiser.header.jwt.key.resource [" + keyResource + "]."); throw new IllegalStateException(msg); } else { RuntimeEnvironment.enableBouncyCastleIfPossible(); } return new PemResourceKeyResolver(); }
protected boolean isBouncyCastleAvailable() { return RuntimeEnvironment.BOUNCY_CASTLE_AVAILABLE; }