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 auth issue with the new API #444

Merged
merged 2 commits into from
Aug 30, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 3 additions & 2 deletions proxy/src/main/java/com/wavefront/agent/AbstractAgent.java
Original file line number Diff line number Diff line change
Expand Up @@ -1601,8 +1601,9 @@ private AgentConfiguration checkin() {
}
logger.info("Checking in: " + ObjectUtils.firstNonNull(serverEndpointUrl, server));
try {
newConfig = agentAPI.proxyCheckin(agentId, hostname, token, props.getString("build.version"),
agentMetricsCaptureTsWorkingCopy, agentMetricsWorkingCopy, ephemeral);
newConfig = agentAPI.proxyCheckin(agentId, "Bearer " + token, hostname,
props.getString("build.version"), agentMetricsCaptureTsWorkingCopy,
agentMetricsWorkingCopy, ephemeral);
agentMetricsWorkingCopy = null;
hadSuccessfulCheckin = true;
} catch (ClientErrorException ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@ private void scheduleTaskForSizing(ResubmissionTask task) {
}

@Override
public AgentConfiguration proxyCheckin(UUID agentId, String hostname, String token, String version,
public AgentConfiguration proxyCheckin(UUID agentId, String token, String hostname, String version,
Long currentMillis, JsonNode agentMetrics, Boolean ephemeral) {
return wrapped.proxyCheckin(agentId, hostname, token, version, currentMillis, agentMetrics, ephemeral);
return wrapped.proxyCheckin(agentId, token, hostname, version, currentMillis, agentMetrics, ephemeral);
}

@Override
Expand Down