This repository has been archived by the owner on Oct 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RDCC-6762]Update profileSync job to sync data between IDAM and SRD (#…
…718) * [RDCC-6762]Update profileSync job to sync data between IDAM and SRD * Bumping chart version/ fixing aliases * [RDCC-6762]Added Integration Test cases and fixed some failure test cases * [RDCC-6762]Added Code Review comment * [RDCC-6762]Fix the concurrent scheduler ID generation issue * [RDCC-6762]CVE fix * [RDCC-6762]Integration test failure fix in PR --------- Co-authored-by: hmcts-jenkins-j-to-z <61242337+hmcts-jenkins-j-to-z[bot]@users.noreply.github.com>
- Loading branch information
1 parent
94e7b2a
commit 7a159f9
Showing
14 changed files
with
345 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/uk/gov/hmcts/reform/profilesync/client/CaseWorkerRefApiClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package uk.gov.hmcts.reform.profilesync.client; | ||
|
||
import feign.Headers; | ||
import feign.Response; | ||
import org.springframework.cloud.openfeign.FeignClient; | ||
import org.springframework.web.bind.annotation.PutMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestHeader; | ||
import uk.gov.hmcts.reform.profilesync.domain.CaseWorkerProfile; | ||
|
||
import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE; | ||
|
||
@FeignClient(name = "caseWorkerRefApiClient", url = "${caseworker.api.url}") | ||
public interface CaseWorkerRefApiClient { | ||
|
||
@PutMapping(value = "/refdata/case-worker/users/sync", consumes = {APPLICATION_JSON_VALUE}, | ||
produces = {APPLICATION_JSON_VALUE}) | ||
@Headers({"authorization: {authorization}", "serviceauthorization: {serviceauthorization}"}) | ||
public Response syncCaseWorkerUserStatus(@RequestHeader("authorization") String authorization, | ||
@RequestHeader("serviceauthorization") String serviceAuthorization, | ||
@RequestBody CaseWorkerProfile body); | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/uk/gov/hmcts/reform/profilesync/domain/CaseWorkerProfile.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package uk.gov.hmcts.reform.profilesync.domain; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@Builder | ||
public class CaseWorkerProfile { | ||
|
||
|
||
@JsonProperty("suspended") | ||
private boolean idamStatus; | ||
|
||
@JsonProperty("email_id") | ||
private String email; | ||
|
||
@JsonProperty("first_name") | ||
private String firstName; | ||
|
||
@JsonProperty("last_name") | ||
private String lastName; | ||
|
||
@JsonProperty("case_worker_id") | ||
private String userId; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.