Java 类io.jsonwebtoken.lang.RuntimeEnvironment 实例源码

项目:juiser    文件:ConfigJwkResolver.java   
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();
    }
项目:jjwt    文件:SignatureProvider.java   
protected boolean isBouncyCastleAvailable() {
    return RuntimeEnvironment.BOUNCY_CASTLE_AVAILABLE;
}