Skip to content

Commit f2d4434

Browse files
Merge branch 'main' into dependabot/github_actions/actions/upload-artifact-7.0.0
2 parents cfd1bd6 + d54e28d commit f2d4434

File tree

15 files changed

+189
-311
lines changed

15 files changed

+189
-311
lines changed

.github/workflows/cflite_batch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout
12-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
12+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1313
- name: Build Fuzzers
1414
id: build
1515
uses: google/clusterfuzzlite/actions/build_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1

.github/workflows/cflite_cron.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout
12-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
12+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1313
- name: Build Fuzzers
1414
id: build
1515
uses: google/clusterfuzzlite/actions/build_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1

.github/workflows/cflite_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
cancel-in-progress: true
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
14+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1515
- name: Build Fuzzers
1616
id: build
1717
uses: google/clusterfuzzlite/actions/build_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,6 @@ jobs:
7373
# Upload the results to GitHub's code scanning dashboard (optional).
7474
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
7575
- name: "Upload to code-scanning"
76-
uses: github/codeql-action/upload-sarif@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # v4.32.0
76+
uses: github/codeql-action/upload-sarif@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
7777
with:
7878
sarif_file: results.sarif

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1515
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
1616
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
17-
<quarkus.platform.version>3.31.1</quarkus.platform.version>
17+
<quarkus.platform.version>3.32.1</quarkus.platform.version>
1818
<skipITs>true</skipITs>
19-
<surefire-plugin.version>3.5.4</surefire-plugin.version>
19+
<surefire-plugin.version>3.5.5</surefire-plugin.version>
2020
</properties>
2121

2222
<dependencyManagement>
@@ -76,7 +76,7 @@
7676
<dependency>
7777
<groupId>com.code-intelligence</groupId>
7878
<artifactId>jazzer-junit</artifactId>
79-
<version>0.24.0</version>
79+
<version>0.30.0</version>
8080
<scope>test</scope>
8181
</dependency>
8282
<dependency>
@@ -149,7 +149,7 @@
149149
<dependency>
150150
<groupId>nl.mijnoverheidzakelijk.ldv</groupId>
151151
<artifactId>logboekdataverwerking-wrapper</artifactId>
152-
<version>1.0.0-SNAPSHOT</version>
152+
<version>1.2.1-SNAPSHOT</version>
153153
</dependency>
154154

155155
</dependencies>

src/main/java/nl/rijksoverheid/moz/controller/ProfielController.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public class ProfielController {
7474
description = "Partij niet gevonden of is verwijderd"
7575
)
7676
})
77-
@Logboek(name= "getPartij", processingActivityId = "028")
77+
@Logboek(name= "getPartij", processingActivityId = "https://mijnoverheidzakelijk.nl/verwerkingsactiviteiten/PS-028")
7878
public Response getPartij(
7979
@PathParam("identificatieType") IdentificatieType identificatieType,
8080
@PathParam("identificatieNummer") String identificatieNummer,
@@ -115,7 +115,7 @@ public Response getPartij(
115115
description = "Contactgegeven succesvol toegevoegd"
116116
)
117117
})
118-
@Logboek(name= "addContactgegeven", processingActivityId = "142")
118+
@Logboek(name= "addContactgegeven", processingActivityId = "https://mijnoverheidzakelijk.nl/verwerkingsactiviteiten/PS-142")
119119
public Response addContactgegeven(
120120
@PathParam("identificatieType") IdentificatieType identificatieType,
121121
@PathParam("identificatieNummer") String identificatieNummer,
@@ -152,7 +152,7 @@ public Response addContactgegeven(
152152
@APIResponse(responseCode = "200", description = "Contactgegeven succesvol bijgewerkt"),
153153
@APIResponse(responseCode = "404", description = "Contactgegeven of partij niet gevonden")
154154
})
155-
@Logboek(name= "updateContactgegeven", processingActivityId = "367")
155+
@Logboek(name= "updateContactgegeven", processingActivityId = "https://mijnoverheidzakelijk.nl/verwerkingsactiviteiten/PS-367")
156156
public Response updateContactgegeven(
157157
@PathParam("identificatieType") IdentificatieType identificatieType,
158158
@PathParam("identificatieNummer") String identificatieNummer,
@@ -191,7 +191,7 @@ public Response updateContactgegeven(
191191
@APIResponse(responseCode = "204", description = "Contactgegeven succesvol verwijderd"),
192192
@APIResponse(responseCode = "404", description = "Contactgegeven of partij niet gevonden")
193193
})
194-
@Logboek(name= "deleteContactgegeven", processingActivityId = "591")
194+
@Logboek(name= "deleteContactgegeven", processingActivityId = "https://mijnoverheidzakelijk.nl/verwerkingsactiviteiten/PS-591")
195195
public Response deleteContactgegeven(
196196
@PathParam("identificatieType") IdentificatieType identificatieType,
197197
@PathParam("identificatieNummer") String identificatieNummer,
@@ -232,7 +232,7 @@ public Response deleteContactgegeven(
232232
description = "Voorkeur succesvol toegevoegd"
233233
)
234234
})
235-
@Logboek(name= "addVoorkeur", processingActivityId = "824")
235+
@Logboek(name= "addVoorkeur", processingActivityId = "https://mijnoverheidzakelijk.nl/verwerkingsactiviteiten/PS-824")
236236
public Response addVoorkeur(
237237
@PathParam("identificatieType") IdentificatieType identificatieType,
238238
@PathParam("identificatieNummer") String identificatieNummer,
@@ -269,7 +269,7 @@ public Response addVoorkeur(
269269
@APIResponse(responseCode = "200", description = "Voorkeur succesvol bijgewerkt"),
270270
@APIResponse(responseCode = "404", description = "Voorkeur of partij niet gevonden")
271271
})
272-
@Logboek(name= "updateVoorkeur", processingActivityId = "256")
272+
@Logboek(name= "updateVoorkeur", processingActivityId = "https://mijnoverheidzakelijk.nl/verwerkingsactiviteiten/PS-256")
273273
public Response updateVoorkeur(
274274
@PathParam("identificatieType") IdentificatieType identificatieType,
275275
@PathParam("identificatieNummer") String identificatieNummer,
@@ -308,7 +308,7 @@ public Response updateVoorkeur(
308308
@APIResponse(responseCode = "204", description = "Voorkeur succesvol verwijderd"),
309309
@APIResponse(responseCode = "404", description = "Voorkeur of partij niet gevonden")
310310
})
311-
@Logboek(name= "deleteVoorkeur", processingActivityId = "478")
311+
@Logboek(name= "deleteVoorkeur", processingActivityId = "https://mijnoverheidzakelijk.nl/verwerkingsactiviteiten/PS-478")
312312
public Response deleteVoorkeur(
313313
@PathParam("identificatieType") IdentificatieType identificatieType,
314314
@PathParam("identificatieNummer") String identificatieNummer,

src/main/java/nl/rijksoverheid/moz/entity/Contactgegeven.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ public class Contactgegeven extends PanacheEntity {
3434
@Nullable
3535
private LocalDateTime geverifieerdAt;
3636

37+
@Nullable
38+
private String verificatieReferentieId;
39+
3740
public Partij getPartij() {
3841
return partij;
3942
}
@@ -74,4 +77,13 @@ public LocalDateTime getGeverifieerdAt() {
7477
public void setGeverifieerdAt(@Nullable LocalDateTime geverifieerdAt) {
7578
this.geverifieerdAt = geverifieerdAt;
7679
}
80+
81+
@Nullable
82+
public String getVerificatieReferentieId() {
83+
return verificatieReferentieId;
84+
}
85+
86+
public void setVerificatieReferentieId(@Nullable String verificatieReferentieId) {
87+
this.verificatieReferentieId = verificatieReferentieId;
88+
}
7789
}

src/main/java/nl/rijksoverheid/moz/services/EmailVerificatieService.java

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
import nl.rijksoverheid.moz.dto.request.EmailVerificatieRequest;
99
import nl.rijksoverheid.moz.entity.Contactgegeven;
1010
import nl.rijksoverheid.moz.entity.Partij;
11-
import nl.rijksoverheid.moz.external.clients.email.api.DefaultApi;
12-
import nl.rijksoverheid.moz.external.clients.email.model.VerificationRequestsPost201Response;
13-
import nl.rijksoverheid.moz.external.clients.email.model.VerificationRequestsPostRequest;
14-
import nl.rijksoverheid.moz.external.clients.email.model.VerificationRequestsVerifyPostRequest;
11+
import nl.rijksoverheid.moz.external.clients.verificatie_service.api.VerificationControllerApi;
12+
import nl.rijksoverheid.moz.external.clients.verificatie_service.model.VerificationApplicationRequest;
13+
import nl.rijksoverheid.moz.external.clients.verificatie_service.model.VerificationRequest;
1514
import org.eclipse.microprofile.config.inject.ConfigProperty;
1615
import org.eclipse.microprofile.rest.client.inject.RestClient;
1716
import org.jboss.logging.Logger;
@@ -25,17 +24,14 @@ public class EmailVerificatieService {
2524

2625
@Inject
2726
@RestClient
28-
DefaultApi emailVerificatieApi;
27+
VerificationControllerApi emailVerificatieApi;
2928

3029
@ConfigProperty(name = "notifynl.emailverificatie.api-key")
3130
String apiKey;
3231

3332
@ConfigProperty(name = "notifynl.emailverificatie.template-id")
3433
String templateId;
3534

36-
@ConfigProperty(name = "notifynl.emailverificatie.reference")
37-
String reference;
38-
3935
@Transactional
4036
public boolean verifieerEmail(EmailVerificatieRequest emailVerificatieRequest) {
4137
Partij partij = Partij.findByIdentificatie(emailVerificatieRequest.identificatieType, emailVerificatieRequest.identificatieNummer);
@@ -55,16 +51,15 @@ public boolean verifieerEmail(EmailVerificatieRequest emailVerificatieRequest) {
5551
return false;
5652
}
5753

58-
VerificationRequestsVerifyPostRequest request = new VerificationRequestsVerifyPostRequest();
59-
request.setEmail(emailVerificatieRequest.email);
54+
VerificationRequest request = new VerificationRequest();
55+
request.setReferenceId(contact.getVerificatieReferentieId());
6056
request.setCode(emailVerificatieRequest.verificatieCode);
61-
request.setReference(reference);
62-
6357
try {
64-
var response = emailVerificatieApi.verificationRequestsVerifyPost(request);
58+
var response = emailVerificatieApi.verifyPost(request);
6559

66-
if (response != null && Boolean.TRUE.equals(response.getVerified())) {
60+
if (response != null && Boolean.TRUE.equals(response.getSuccess())) {
6761
contact.setGeverifieerdAt(LocalDateTime.now());
62+
contact.setVerificatieReferentieId(null);
6863
LOG.infof("Email succesvol geverifieerd voor: %s", emailVerificatieRequest.email);
6964
return true;
7065
}
@@ -83,30 +78,26 @@ public boolean verifieerEmail(EmailVerificatieRequest emailVerificatieRequest) {
8378
}
8479
}
8580

86-
public boolean requestEmailVerificationCode(String email) {
87-
VerificationRequestsPostRequest request = new VerificationRequestsPostRequest();
88-
request.setEmail(email);
89-
request.setApiKey(apiKey);
90-
request.setTemplateId(templateId);
91-
request.setReference(reference);
81+
public String requestEmailVerificationCode(String email) {
82+
83+
VerificationApplicationRequest verificationApplicationRequest = new VerificationApplicationRequest();
84+
verificationApplicationRequest.setApiKey(apiKey);
85+
verificationApplicationRequest.setTemplateId(templateId);
86+
verificationApplicationRequest.setEmail(email);
87+
9288

9389
try {
94-
VerificationRequestsPost201Response res = emailVerificatieApi.verificationRequestsPost(request);
95-
if (res != null) {
96-
boolean success = res.getSuccess();
97-
if (!success) {
98-
LOG.errorf("Email verificatie verzoek mislukt voor email: %s. Response success was false.", email);
99-
}
100-
return success;
90+
String referenceId = emailVerificatieApi.requestPost(verificationApplicationRequest);
91+
if (referenceId != null) {
92+
return referenceId;
10193
}
94+
LOG.errorf("Email verificatie verzoek mislukt voor email: %s. Response success was false.", email);
10295
} catch (WebApplicationException e) {
10396
String errorBody = e.getResponse().readEntity(String.class);
10497
LOG.errorf("NotifyNL API Error (%d) voor %s: %s", e.getResponse().getStatus(), email, errorBody);
105-
return false;
10698
} catch (RuntimeException e) {
10799
LOG.error("Onverwachte fout tijdens aanvragen email verificatie: " + e.getMessage(), e);
108-
return false;
109100
}
110-
return false;
101+
return null;
111102
}
112103
}

src/main/java/nl/rijksoverheid/moz/services/PartijService.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ public void addContactgegeven(
5454

5555
if (request.type == ContactType.Email) {
5656
//todo bepaal wat we doen als het versturen van een verificatie code mislukt
57-
emailVerificatieService.requestEmailVerificationCode(request.waarde);
57+
String referenceId = emailVerificatieService.requestEmailVerificationCode(request.waarde);
58+
contactgegeven.setVerificatieReferentieId(referenceId);
5859
}
5960

6061
contactgegeven.setGeverifieerdAt(null);
@@ -118,7 +119,8 @@ public boolean updateContactgegeven(IdentificatieType identificatieType, String
118119

119120
if (request.type == ContactType.Email) {
120121
//todo bepaal wat we doen als het versturen van een verificatie code mislukt
121-
emailVerificatieService.requestEmailVerificationCode(request.waarde);
122+
String referenceId = emailVerificatieService.requestEmailVerificationCode(request.waarde);
123+
contact.setVerificatieReferentieId(referenceId);
122124
}
123125

124126
contact.setGeverifieerdAt(null);

0 commit comments

Comments
 (0)