Skip to content

Commit

Permalink
Bad header for authentication...
Browse files Browse the repository at this point in the history
  • Loading branch information
cpoder committed Jun 11, 2024
1 parent 21e06d5 commit ea2ed8e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public void configureRoutings(String url, String tenant, String login, String pa
String uid = currentAppServer.getID().split("\\.")[1];
var appServer = new AppServerUpdate();
appServer.setCustomHttpHeaders(new ArrayList<>());
appServer.addCustomHttpHeadersItem(new AppServerCustomHttpHeadersInner().name("Authentication")
appServer.addCustomHttpHeadersItem(new AppServerCustomHttpHeadersInner().name("Authorization")
.value("Basic " + Base64.getEncoder()
.encodeToString((tenant + "/" + login + ":" + password).getBytes())));
appServer.setDestinations(new ArrayList<>());
Expand All @@ -260,7 +260,7 @@ public void configureRoutings(String url, String tenant, String login, String pa
} else {
// Create appserver
var appServer = new AppServer().contentType(ContentTypeEnum.JSON)
.addCustomHttpHeadersItem(new AppServerCustomHttpHeadersInner().name("Authentication")
.addCustomHttpHeadersItem(new AppServerCustomHttpHeadersInner().name("Authorization")
.value("Basic " + Base64.getEncoder().encodeToString(
(tenant + "/" + login + ":" + password).getBytes())))
.addDestinationsItem(new AppServerHttpLorawanDestination().addAddressesItem(url + "/uplink")
Expand Down

0 comments on commit ea2ed8e

Please sign in to comment.