Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HttpConnection #69

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/com/c8db/C8DB.java
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,8 @@ public synchronized C8DB build() {
if (protocol == null || Protocol.VST == protocol) {
connectionFactory = new VstConnectionFactorySync(host, timeout, connectionTtl, useSsl, sslContext);
} else {
connectionFactory = new HttpConnectionFactory(timeout, user, password, secretProvider, email, jwtAuth, useSsl,
sslContext, custom, protocol, connectionTtl, httpCookieSpec, apiKey, auxHost);
connectionFactory = new HttpConnectionFactory(timeout, user, password, email, secretProvider, jwtAuth, useSsl,
sslContext, custom, protocol, connectionTtl, httpCookieSpec, jwtToken, apiKey, auxHost);
}
final Map<Service, Collection<Host>> hostsMatrix = createHostMatrix(max, connectionFactory);
final HostResolver hostResolver = createHostResolver(hostsMatrix, max, connectionFactory);
Expand Down
19 changes: 4 additions & 15 deletions src/main/java/com/c8db/internal/http/HttpConnectionFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,14 @@ public class HttpConnectionFactory implements ConnectionFactory {
private final HttpConnection.Builder builder;

public HttpConnectionFactory(final Integer timeout, final String user, final String password, final String email,
final Boolean jwtAuth, final Boolean useSsl, final SSLContext sslContext, final C8Serialization util,
final Protocol protocol, final Long connectionTtl, String httpCookieSpec, final String jwtToken, final String apiKey,
final HostDescription auxiliaryHost) {
final SecretProvider secretProvider, final Boolean jwtAuth, final Boolean useSsl, final SSLContext sslContext,
final C8Serialization util, final Protocol protocol, final Long connectionTtl, String httpCookieSpec,
final String jwtToken, final String apiKey, final HostDescription auxiliaryHost) {
super();
builder = new HttpConnection.Builder().timeout(timeout).user(user).password(password).email(email)
.jwtAuthEnabled(jwtAuth).useSsl(useSsl).sslContext(sslContext).serializationUtil(util)
.contentType(protocol).ttl(connectionTtl).httpCookieSpec(httpCookieSpec).jwt(jwtToken)
.apiKey(apiKey).auxHost(auxiliaryHost);
}

public HttpConnectionFactory(final Integer timeout, final String user, final String password,
SecretProvider secretProvider, final String email, final Boolean jwtAuth, final Boolean useSsl,
final SSLContext sslContext, final C8Serialization util, final Protocol protocol, final Long connectionTtl,
String httpCookieSpec, final String apiKey, final HostDescription auxiliaryHost) {
super();
builder = new HttpConnection.Builder().timeout(timeout).secretProvider(secretProvider).email(email)
.jwtAuthEnabled(jwtAuth).useSsl(useSsl).sslContext(sslContext).serializationUtil(util)
.contentType(protocol).ttl(connectionTtl).httpCookieSpec(httpCookieSpec)
.apiKey(apiKey).auxHost(auxiliaryHost).user(user).password(password);
.apiKey(apiKey).auxHost(auxiliaryHost).secretProvider(secretProvider);
}

@Override
Expand Down