Fix path in AMQP auth. (#544)

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
Kai Zimmermann
2017-06-17 07:55:13 +02:00
committed by GitHub
parent 6f81e3f251
commit 1a5aa6cb04

View File

@@ -218,7 +218,7 @@ public class AmqpAuthenticationMessageHandler extends BaseAmqpService {
cache.put(downloadId, downloadCache);
authentificationResponse.setDownloadUrl(UriComponentsBuilder
.fromUri(hostnameResolver.resolveHostname().toURI()).path("/api/v1/downloadserver/downloadId/")
.path(tenantAware.getCurrentTenant()).path(downloadId).build().toUriString());
.path(tenantAware.getCurrentTenant()).path("/").path(downloadId).build().toUriString());
authentificationResponse.setResponseCode(HttpStatus.OK.value());
} catch (final BadCredentialsException | AuthenticationServiceException | CredentialsExpiredException e) {
LOG.error("Login failed", e);