Search in sources :

Example 1 with CredentialSourceDependency

use of org.jboss.as.clustering.controller.CredentialSourceDependency in project wildfly by wildfly.

the class EncryptProtocolConfigurationBuilder method configure.

@Override
public Builder<ProtocolConfiguration<P>> configure(OperationContext context, ModelNode model) throws OperationFailedException {
    String keyStore = KEY_STORE.resolveModelAttribute(context, model).asString();
    this.keyStore = new InjectedValueDependency<>(CommonUnaryRequirement.KEY_STORE.getServiceName(context, keyStore), KeyStore.class);
    this.keyAlias = KEY_ALIAS.resolveModelAttribute(context, model).asString();
    this.credentialSource = new CredentialSourceDependency(context, model);
    return super.configure(context, model);
}
Also used : CredentialSourceDependency(org.jboss.as.clustering.controller.CredentialSourceDependency) KeyStore(java.security.KeyStore)

Example 2 with CredentialSourceDependency

use of org.jboss.as.clustering.controller.CredentialSourceDependency in project wildfly by wildfly.

the class SingleSignOnSessionFactoryBuilder method configure.

@Override
public Builder<SingleSignOnSessionFactory> configure(OperationContext context, ModelNode model) throws OperationFailedException {
    String keyStore = KEY_STORE.resolveModelAttribute(context, model).asString();
    this.keyStore = new InjectedValueDependency<>(CommonUnaryRequirement.KEY_STORE.getServiceName(context, keyStore), KeyStore.class);
    this.keyAlias = KEY_ALIAS.resolveModelAttribute(context, model).asString();
    this.credentialSource = new CredentialSourceDependency(context, model);
    Optional<String> sslContext = ModelNodes.optionalString(SSL_CONTEXT.resolveModelAttribute(context, model));
    this.sslContext = sslContext.map(value -> new InjectedValueDependency<>(CommonUnaryRequirement.SSL_CONTEXT.getServiceName(context, value), SSLContext.class)).orElse(null);
    return this;
}
Also used : CredentialSourceDependency(org.jboss.as.clustering.controller.CredentialSourceDependency) SSLContext(javax.net.ssl.SSLContext) KeyStore(java.security.KeyStore)

Aggregations

KeyStore (java.security.KeyStore)2 CredentialSourceDependency (org.jboss.as.clustering.controller.CredentialSourceDependency)2 SSLContext (javax.net.ssl.SSLContext)1