From a31b4e47196e0ded9f6cd464c7c565294a5d0c96 Mon Sep 17 00:00:00 2001 From: Mathias Oben Date: Wed, 22 Jun 2022 17:38:20 +0200 Subject: [PATCH] ServerEvents.authenticateSession should again throw AuthenticationException --- ocpp-common/src/main/java/eu/chargetime/ocpp/ServerEvents.java | 2 +- .../src/main/java/eu/chargetime/ocpp/test/DummyHandlers.java | 3 ++- .../main/java/eu/chargetime/ocpp/test/FakeCentralSystem.java | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ocpp-common/src/main/java/eu/chargetime/ocpp/ServerEvents.java b/ocpp-common/src/main/java/eu/chargetime/ocpp/ServerEvents.java index 7b4d330e9..2e66f0f30 100644 --- a/ocpp-common/src/main/java/eu/chargetime/ocpp/ServerEvents.java +++ b/ocpp-common/src/main/java/eu/chargetime/ocpp/ServerEvents.java @@ -29,7 +29,7 @@ of this software and associated documentation files (the "Software"), to deal import java.util.UUID; public interface ServerEvents { - void authenticateSession(SessionInformation information, String username, byte[] password); + void authenticateSession(SessionInformation information, String username, byte[] password) throws AuthenticationException; void newSession(UUID sessionIndex, SessionInformation information); diff --git a/ocpp-v1_6-test/src/main/java/eu/chargetime/ocpp/test/DummyHandlers.java b/ocpp-v1_6-test/src/main/java/eu/chargetime/ocpp/test/DummyHandlers.java index fa7c9a285..6e41551b3 100644 --- a/ocpp-v1_6-test/src/main/java/eu/chargetime/ocpp/test/DummyHandlers.java +++ b/ocpp-v1_6-test/src/main/java/eu/chargetime/ocpp/test/DummyHandlers.java @@ -26,6 +26,7 @@ of this software and associated documentation files (the "Software"), to deal SOFTWARE. */ +import eu.chargetime.ocpp.AuthenticationException; import eu.chargetime.ocpp.ServerEvents; import eu.chargetime.ocpp.feature.profile.ServerCoreEventHandler; import eu.chargetime.ocpp.feature.profile.ServerFirmwareManagementEventHandler; @@ -164,7 +165,7 @@ public ServerEvents generateServerEventsHandler() { return new ServerEvents() { @Override public void authenticateSession( - SessionInformation information, String username, byte[] password) {} + SessionInformation information, String username, byte[] password) throws AuthenticationException {} @Override public void newSession(UUID sessionIndex, SessionInformation information) { diff --git a/ocpp-v2_0-test/src/main/java/eu/chargetime/ocpp/test/FakeCentralSystem.java b/ocpp-v2_0-test/src/main/java/eu/chargetime/ocpp/test/FakeCentralSystem.java index 020fe21c7..25cae3629 100644 --- a/ocpp-v2_0-test/src/main/java/eu/chargetime/ocpp/test/FakeCentralSystem.java +++ b/ocpp-v2_0-test/src/main/java/eu/chargetime/ocpp/test/FakeCentralSystem.java @@ -25,6 +25,7 @@ of this software and associated documentation files (the "Software"), to deal SOFTWARE. */ +import eu.chargetime.ocpp.AuthenticationException; import eu.chargetime.ocpp.IServerAPI; import eu.chargetime.ocpp.JSONConfiguration; import eu.chargetime.ocpp.JSONServer; @@ -73,7 +74,7 @@ public void started() throws Exception { new ServerEvents() { @Override public void authenticateSession( - SessionInformation information, String username, byte[] password) {} + SessionInformation information, String username, byte[] password) throws AuthenticationException {} @Override public void newSession(UUID sessionIndex, SessionInformation information) {