Skip to content

Commit 9883f7e

Browse files
committed
refactor: improve code comments and formatting in event handling classes
1 parent 29a22c7 commit 9883f7e

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

gateway/src/main/java/org/georchestra/gateway/accounts/events/AccountCreatedEventSender.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
import lombok.extern.slf4j.Slf4j;
3434

3535
/**
36-
* A service bean that listens for {@link AccountCreated} events and post user to url set in properties
37-
* queue.
36+
* A service bean that listens for {@link AccountCreated} events and post user
37+
* to url set in properties queue.
3838
* <p>
3939
* This class is responsible for notifying other services when a new user
4040
* account is created via OAuth2 authentication. It transforms the event data
@@ -75,8 +75,8 @@ public void on(AccountCreated event) {
7575
}
7676

7777
/**
78-
* Sends a message to the specified URL indicating that a new OAuth2 user account has
79-
* been created.
78+
* Sends a message to the specified URL indicating that a new OAuth2 user
79+
* account has been created.
8080
*
8181
* <p>
8282
* <b>Example JSON output:</b>

gateway/src/main/java/org/georchestra/gateway/accounts/events/AccountCreatedEventsConfigurationProperties.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@
2525
import lombok.Generated;
2626

2727
/**
28-
* Configuration properties for event dispatching related to account
29-
* creation.
28+
* Configuration properties for event dispatching related to account creation.
3029
* <p>
31-
* These properties define how geOrchestra should publish events
32-
* when a new LDAP account is created following a user's first successful login
33-
* via OAuth2 authentication.
30+
* These properties define how geOrchestra should publish events when a new LDAP
31+
* account is created following a user's first successful login via OAuth2
32+
* authentication.
3433
* </p>
3534
*
3635
* <p>

gateway/src/test/java/org/georchestra/gateway/accounts/events/AccountCreatedEventSenderTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
import org.georchestra.gateway.accounts.admin.AccountCreated;
2828
import org.georchestra.security.model.GeorchestraUser;
29+
import org.json.JSONException;
2930
import org.json.JSONObject;
3031
import org.junit.jupiter.api.AfterEach;
3132
import org.junit.jupiter.api.BeforeEach;
@@ -63,7 +64,7 @@ void tearDown() {
6364
}
6465

6566
@Test
66-
void testOnAccountCreatedWithOAuth2Provider() {
67+
void testOnAccountCreatedWithOAuth2Provider() throws JSONException {
6768
// Setup WireMock stub
6869
wireMockServer.stubFor(WireMock.post(WireMock.urlEqualTo("/events")).willReturn(WireMock.aResponse()
6970
.withStatus(200).withHeader("Content-Type", "application/json").withBody("{\"status\":\"success\"}")));

0 commit comments

Comments
 (0)