Convert ExternalServiceCredentials to a record

This commit is contained in:
Jon Chambers
2023-01-12 11:44:43 -05:00
committed by Jon Chambers
parent 7018062606
commit 050035dd52
10 changed files with 20 additions and 42 deletions

View File

@@ -57,7 +57,7 @@ public class SecureBackupClient {
.uri(deleteUri)
.DELETE()
.header("Authorization", "Basic " + Base64.getEncoder().encodeToString(
(credentials.getUsername() + ":" + credentials.getPassword()).getBytes(StandardCharsets.UTF_8)))
(credentials.username() + ":" + credentials.password()).getBytes(StandardCharsets.UTF_8)))
.build();
return httpClient.sendAsync(request, HttpResponse.BodyHandlers.ofString()).thenApply(response -> {