Java Code Examples for org.apache.cxf.rs.security.jose.jwe.JweUtils#loadEncryptionProvider()

The following examples show how to use org.apache.cxf.rs.security.jose.jwe.JweUtils#loadEncryptionProvider() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: thorntail   File: DefaultJoseImpl.java    License: Apache License 2.0 5 votes vote down vote up
private JweEncryptionProvider getEncryptionProvider(Properties props, JweHeaders headers) {
    if (isInlinedJwkSetAvailable()) {
        if (KeyAlgorithm.DIRECT == KeyAlgorithm.getAlgorithm(config.keyEncryptionAlgorithm())) {
            return JweUtils.getDirectKeyJweEncryption(loadJsonWebKey(encryptionKeyAlias()));
        } else {
            return JweUtils.createJweEncryptionProvider(loadJsonWebKey(encryptionKeyAlias()), headers);
        }
    } else {
        return JweUtils.loadEncryptionProvider(props, headers);
    }
}
 
Example 2
Source Project: cxf   File: JoseClientCodeStateManager.java    License: Apache License 2.0 4 votes vote down vote up
protected JweEncryptionProvider getInitializedEncryptionProvider() {
    if (encryptionProvider != null) {
        return encryptionProvider;
    }
    return JweUtils.loadEncryptionProvider(false);
}
 
Example 3
Source Project: cxf   File: JoseSessionTokenProvider.java    License: Apache License 2.0 4 votes vote down vote up
protected JweEncryptionProvider getInitializedEncryptionProvider() {
    if (jweEncryptor != null) {
        return jweEncryptor;
    }
    return JweUtils.loadEncryptionProvider(jweRequired);
}
 
Example 4
Source Project: cxf   File: JweWriterInterceptor.java    License: Apache License 2.0 4 votes vote down vote up
protected JweEncryptionProvider getInitializedEncryptionProvider(JweHeaders headers) {
    if (encryptionProvider != null) {
        return encryptionProvider;
    }
    return JweUtils.loadEncryptionProvider(headers, true);
}
 
Example 5
Source Project: cxf   File: AbstractJoseProducer.java    License: Apache License 2.0 4 votes vote down vote up
protected JweEncryptionProvider getInitializedEncryptionProvider(JweHeaders jweHeaders) {
    if (encryptionProvider != null) {
        return encryptionProvider;
    }
    return JweUtils.loadEncryptionProvider(jweHeaders, false);
}