🔐 Removes auth from backend

This commit is contained in:
Rune Harlyk
2024-10-29 20:47:02 +01:00
parent 9923b66208
commit 1c6b9f79c5
41 changed files with 1389 additions and 2212 deletions
+1 -4
View File
@@ -42,12 +42,9 @@ const char *getEventPayload(const char *msg) {
return payload;
}
EventSocket::EventSocket(PsychicHttpServer *server, SecurityManager *securityManager,
AuthenticationPredicate authenticationPredicate)
: _server(server), _securityManager(securityManager), _authenticationPredicate(authenticationPredicate) {}
EventSocket::EventSocket(PsychicHttpServer *server) : _server(server) {}
void EventSocket::begin() {
_socket.setFilter(_securityManager->filterRequest(_authenticationPredicate));
_socket.onOpen((std::bind(&EventSocket::onWSOpen, this, std::placeholders::_1)));
_socket.onClose(std::bind(&EventSocket::onWSClose, this, std::placeholders::_1));
_socket.onFrame(std::bind(&EventSocket::onFrame, this, std::placeholders::_1, std::placeholders::_2));