mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-25 11:45:49 +01:00
Fix BasicAuthentication for websockets (#3219)
Signed-off-by: Jan N. Klug <github@klug.nrw>
This commit is contained in:
parent
1523a1f2ab
commit
32ea8dddd0
@ -146,7 +146,7 @@ public class EventWebSocketServlet extends WebSocketServlet implements EventSubs
|
||||
credentials = new UserApiTokenCredentials(token);
|
||||
} else {
|
||||
// try BasicAuthentication
|
||||
String[] decodedParts = Base64.getDecoder().decode(token).toString().split(":");
|
||||
String[] decodedParts = new String(Base64.getDecoder().decode(token)).split(":");
|
||||
if (decodedParts.length == 2) {
|
||||
credentials = new UsernamePasswordCredentials(decodedParts[0], decodedParts[1]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user