本文整理匯總了Java中io.jsonwebtoken.lang.RuntimeEnvironment類的典型用法代碼示例。如果您正苦於以下問題:Java RuntimeEnvironment類的具體用法?Java RuntimeEnvironment怎麽用?Java RuntimeEnvironment使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
RuntimeEnvironment類屬於io.jsonwebtoken.lang包,在下文中一共展示了RuntimeEnvironment類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createResourceKeyFunction
import io.jsonwebtoken.lang.RuntimeEnvironment; //導入依賴的package包/類
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();
}
示例2: isBouncyCastleAvailable
import io.jsonwebtoken.lang.RuntimeEnvironment; //導入依賴的package包/類
protected boolean isBouncyCastleAvailable() {
return RuntimeEnvironment.BOUNCY_CASTLE_AVAILABLE;
}