private JwkKeys loadPlainPublicKey(String stringContent) { return JwkKeys.builder() .addKey(JwkRSA.builder() .publicKey((RSAPublicKey) KeyConfig.pemBuilder() .publicKey(Resource.create("public key from PKCS8", stringContent)) .build() .publicKey() .orElseThrow(() -> new DeploymentException( "Failed to load public key from string content"))) .build()) .build(); }
private JwkKeys loadPlainPublicKey(String stringContent) { return JwkKeys.builder() .addKey(JwkRSA.builder() .publicKey((RSAPublicKey) KeyConfig.pemBuilder() .publicKey(Resource.create("public key from PKCS8", stringContent)) .build() .publicKey() .orElseThrow(() -> new DeploymentException( "Failed to load public key from string content"))) .build()) .build(); }