Skip to content

Commit c324c5e

Browse files
authored
Merge pull request #198 from m-oben/feature/fix-authenticate-session
ServerEvents.authenticateSession should again throw AuthenticationExc…
2 parents e8bb17b + a31b4e4 commit c324c5e

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

ocpp-common/src/main/java/eu/chargetime/ocpp/ServerEvents.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ of this software and associated documentation files (the "Software"), to deal
2929
import java.util.UUID;
3030

3131
public interface ServerEvents {
32-
void authenticateSession(SessionInformation information, String username, byte[] password);
32+
void authenticateSession(SessionInformation information, String username, byte[] password) throws AuthenticationException;
3333

3434
void newSession(UUID sessionIndex, SessionInformation information);
3535

ocpp-v1_6-test/src/main/java/eu/chargetime/ocpp/test/DummyHandlers.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ of this software and associated documentation files (the "Software"), to deal
2727
SOFTWARE.
2828
*/
2929

30+
import eu.chargetime.ocpp.AuthenticationException;
3031
import eu.chargetime.ocpp.ServerEvents;
3132
import eu.chargetime.ocpp.feature.profile.ServerCoreEventHandler;
3233
import eu.chargetime.ocpp.feature.profile.ServerFirmwareManagementEventHandler;
@@ -202,7 +203,7 @@ public ServerEvents generateServerEventsHandler() {
202203
return new ServerEvents() {
203204
@Override
204205
public void authenticateSession(
205-
SessionInformation information, String username, byte[] password) {}
206+
SessionInformation information, String username, byte[] password) throws AuthenticationException {}
206207

207208
@Override
208209
public void newSession(UUID sessionIndex, SessionInformation information) {

ocpp-v2_0-test/src/main/java/eu/chargetime/ocpp/test/FakeCentralSystem.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ of this software and associated documentation files (the "Software"), to deal
2525
SOFTWARE.
2626
*/
2727

28+
import eu.chargetime.ocpp.AuthenticationException;
2829
import eu.chargetime.ocpp.IServerAPI;
2930
import eu.chargetime.ocpp.JSONConfiguration;
3031
import eu.chargetime.ocpp.JSONServer;
@@ -73,7 +74,7 @@ public void started() throws Exception {
7374
new ServerEvents() {
7475
@Override
7576
public void authenticateSession(
76-
SessionInformation information, String username, byte[] password) {}
77+
SessionInformation information, String username, byte[] password) throws AuthenticationException {}
7778

7879
@Override
7980
public void newSession(UUID sessionIndex, SessionInformation information) {

0 commit comments

Comments
 (0)