Skip to content

Commit

Permalink
TEIID-3755 adding a config property to control the authentication type
Browse files Browse the repository at this point in the history
  • Loading branch information
shawkins committed Oct 14, 2015
1 parent e190838 commit 5ba37fd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions runtime/src/main/java/org/teiid/runtime/EmbeddedConfiguration.java
Expand Up @@ -38,6 +38,7 @@
import org.teiid.dqp.internal.process.DefaultAuthorizationValidator;
import org.teiid.dqp.internal.process.TeiidExecutor;
import org.teiid.dqp.internal.process.ThreadReuseExecutor;
import org.teiid.net.socket.AuthenticationType;
import org.teiid.query.ObjectReplicator;
import org.teiid.security.SecurityHelper;
import org.teiid.transport.SocketConfiguration;
Expand Down Expand Up @@ -74,6 +75,7 @@ public class EmbeddedConfiguration extends DQPConfiguration {
private int memoryBufferSpace ;

private DefaultCacheManager manager;
private AuthenticationType authenticationType;

public EmbeddedConfiguration() {
processorBatchSize = -1;
Expand Down Expand Up @@ -323,4 +325,12 @@ public int getMemoryBufferSpace() {
public void setMemoryBufferSpace(int memoryBufferSpace) {
this.memoryBufferSpace = memoryBufferSpace;
}

public AuthenticationType getAuthenticationType() {
return this.authenticationType;
}

public void setAuthenticationType(AuthenticationType authenticationType) {
this.authenticationType = authenticationType;
}
}
3 changes: 3 additions & 0 deletions runtime/src/main/java/org/teiid/runtime/EmbeddedServer.java
Expand Up @@ -396,6 +396,9 @@ public Object invoke(Object proxy, Method method, Object[] args)
this.dqp.start(config);
this.sessionService.setDqp(this.dqp);
this.services.setSecurityHelper(this.sessionService.getSecurityHelper());
if (this.config.getAuthenticationType() != null) {
this.services.setAuthenticationType(this.config.getAuthenticationType());
}
this.services.setVDBRepository(this.repo);
this.materializationMgr = getMaterializationManager();
this.repo.addListener(this.materializationMgr);
Expand Down

0 comments on commit 5ba37fd

Please sign in to comment.