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() . 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 File: DefaultJoseImpl.java    From thorntail with 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 File: JoseClientCodeStateManager.java    From cxf with 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 File: JoseSessionTokenProvider.java    From cxf with 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 File: JweWriterInterceptor.java    From cxf with 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 File: AbstractJoseProducer.java    From cxf with 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);
}