Skip to content

Commit

Permalink
Fjerner endepunkt for å hente endringer i registrering som nå kommer …
Browse files Browse the repository at this point in the history
…gjennom opplysninger om arbeidssøker-endepunktet
  • Loading branch information
JulieHillRoa committed Nov 4, 2024
1 parent 1eb3301 commit 3c488ca
Show file tree
Hide file tree
Showing 13 changed files with 0 additions and 157 deletions.
6 changes: 0 additions & 6 deletions nais-dev-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ spec:
namespace: team-rocket
- application: poao-tilgang
namespace: poao
- application: aia-backend
namespace: paw
- application: paw-arbeidssoekerregisteret-api-oppslag
namespace: paw
- application: skjermede-personer-pip
Expand Down Expand Up @@ -123,10 +121,6 @@ spec:
value: api://dev-gcp.okonomi.sokos-kontoregister-person/.default
- name: KONTOREGISTER_PERSON_V1_URL
value: http://sokos-kontoregister-person.okonomi
- name: AIA_BACKEND_URL
value: http://aia-backend.paw/aia-backend
- name: AIA_BACKEND_SCOPE
value: api://dev-gcp.paw.paw-arbeidssoker-besvarelse/.default
- name: OPPSLAG_ARBEIDSSOEKERREGISTERET_URL
value: http://paw-arbeidssoekerregisteret-api-oppslag.paw
- name: OPPSLAG_ARBEIDSSOEKERREGISTERET_SCOPE
Expand Down
6 changes: 0 additions & 6 deletions nais-prod-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ spec:
namespace: team-rocket
- application: poao-tilgang
namespace: poao
- application: aia-backend
namespace: paw
- application: paw-arbeidssoekerregisteret-api-oppslag
namespace: paw
- application: skjermede-personer-pip
Expand Down Expand Up @@ -123,10 +121,6 @@ spec:
value: api://prod-gcp.okonomi.sokos-kontoregister-person/.default
- name: KONTOREGISTER_PERSON_V1_URL
value: http://sokos-kontoregister-person.okonomi
- name: AIA_BACKEND_URL
value: http://aia-backend.paw/aia-backend
- name: AIA_BACKEND_SCOPE
value: api://prod-gcp.paw.paw-arbeidssoker-besvarelse/.default
- name: OPPSLAG_ARBEIDSSOEKERREGISTERET_URL
value: http://paw-arbeidssoekerregisteret-api-oppslag.paw
- name: OPPSLAG_ARBEIDSSOEKERREGISTERET_SCOPE
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions src/main/java/no/nav/veilarbperson/config/ClientConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@
import no.nav.common.client.norg2.NorgHttp2Client;
import no.nav.common.metrics.InfluxClient;
import no.nav.common.metrics.MetricsClient;
import no.nav.common.rest.client.RestClient;
import no.nav.common.token_client.builder.AzureAdTokenClientBuilder;
import no.nav.common.token_client.client.AzureAdMachineToMachineTokenClient;
import no.nav.common.token_client.client.AzureAdOnBehalfOfTokenClient;
import no.nav.common.token_client.client.MachineToMachineTokenClient;
import no.nav.poao_tilgang.client.PoaoTilgangClient;
import no.nav.veilarbperson.client.aiabackend.AiaBackendClient;
import no.nav.veilarbperson.client.aiabackend.AiaBackendClientImpl;
import no.nav.veilarbperson.client.digdir.DigdirClient;
import no.nav.veilarbperson.client.digdir.DigdirClientImpl;
import no.nav.veilarbperson.client.kodeverk.KodeverkClient;
Expand Down Expand Up @@ -63,13 +60,6 @@ public VeilarboppfolgingClient veilarboppfolgingClient(EnvironmentProperties pro
() -> authService.getAadOboTokenForTjeneste(properties.getVeilarboppfolgingScope()));
}

@Bean
public AiaBackendClient aiaBackendClient(EnvironmentProperties environmentProperties, AuthService authService) {
return new AiaBackendClientImpl(
environmentProperties.getAiaBackendUrl(),
() -> authService.getAadOboTokenForTjeneste(environmentProperties.getAiaBackendScope()));
}

@Bean
public DigdirClient digdirClient(EnvironmentProperties properties, MachineToMachineTokenClient tokenClient) {
return new DigdirClientImpl(properties.getKrrUrl(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ public class EnvironmentProperties {
private String veilarboppfolgingUrl;
private String kontoregisterScope;
private String kontoregisterUrl;
private String aiaBackendUrl;
private String aiaBackendScope;
private String oppslagArbeidssoekerregisteretUrl;
private String oppslagArbeidssoekerregisteretScope;
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import no.nav.veilarbperson.service.AuthService;
import no.nav.veilarbperson.service.CvJobbprofilService;
import no.nav.veilarbperson.service.PersonV2Service;
import no.nav.veilarbperson.service.RegistreringService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
Expand All @@ -24,8 +23,6 @@ public class PersonController {

private final CvJobbprofilService cvJobbprofilService;

private final RegistreringService registreringService;

@Deprecated
@GetMapping("/aktorid")
public AktoerId aktorid(@RequestParam("fnr") Fnr fnr) {
Expand Down Expand Up @@ -79,15 +76,6 @@ public ResponseEntity<String> cvOgJobbprofil(@RequestParam(value = "fnr", requir
return cvJobbprofilService.hentCvJobbprofilJson(fnr);
}

@Deprecated
@PostMapping("/registrering/endringer")
public ResponseEntity<String> endringIRegistreringdata(@RequestBody PersonRequestBody personRequestBody) {
Fnr fnr = Fnr.of(personRequestBody.fodselsnummer());
authService.stoppHvisEksternBruker();
authService.sjekkLesetilgang(fnr);
return registreringService.hentEndringIRegistreringsdata(fnr);
}

// TODO: Det er hårete å måtte skille på ekstern og intern
// Lag istedenfor en egen controller for interne operasjoner og en annen for eksterne
private Fnr hentIdentForEksternEllerIntern(Fnr queryParamFnr) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
import org.springframework.web.server.ResponseStatusException;

import java.io.IOException;
import java.util.List;

import static no.nav.veilarbperson.utils.SecureLog.secureLog;


@Slf4j
@RestController
Expand All @@ -32,8 +28,6 @@ public class PersonV3Controller {

private final CvJobbprofilService cvJobbprofilService;

private final RegistreringService registreringService;

private final OppslagArbeidssoekerregisteretService oppslagArbeidssoekerregisteretService;

@PostMapping("/hent-person")
Expand Down Expand Up @@ -72,14 +66,6 @@ public ResponseEntity<String> cvOgJobbprofil(@RequestBody PersonRequest personRe
return cvJobbprofilService.hentCvJobbprofilJson(personRequest.getFnr());
}

@PostMapping("/person/registrering/hent-endringer")
@Operation(summary = "Henter endringer på registreringen til person")
public ResponseEntity<String> endringIRegistreringdata(@RequestBody PersonRequest personRequest) {
authService.stoppHvisEksternBruker();
authService.sjekkLesetilgang(personRequest.getFnr());
return registreringService.hentEndringIRegistreringsdata(personRequest.getFnr());
}

@PostMapping("/person/hent-malform")
@Operation(summary = "Henter malform fra DIGDIR tjeneste")
public Malform malform(@RequestBody PersonRequest personRequest) {
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ app.env.veilarboppfolgingScope=${VEILARBOPPFOLGING_SCOPE}
app.env.veilarboppfolgingUrl=${VEILARBOPPFOLGING_URL}
app.env.kontoregisterScope=${KONTOREGISTER_PERSON_V1_SCOPE}
app.env.kontoregisterUrl=${KONTOREGISTER_PERSON_V1_URL}
app.env.aiaBackendUrl=${AIA_BACKEND_URL}
app.env.aiaBackendScope=${AIA_BACKEND_SCOPE}
app.env.oppslagArbeidssoekerregisteretScope=${OPPSLAG_ARBEIDSSOEKERREGISTERET_SCOPE}
app.env.oppslagArbeidssoekerregisteretUrl=${OPPSLAG_ARBEIDSSOEKERREGISTERET_URL}

Expand Down
19 changes: 0 additions & 19 deletions src/test/java/no/nav/veilarbperson/config/ClientTestConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@
import no.nav.common.health.HealthCheckResult;
import no.nav.common.health.selftest.SelfTestChecks;
import no.nav.common.metrics.MetricsClient;
import no.nav.common.rest.client.RestClient;
import no.nav.common.token_client.client.AzureAdOnBehalfOfTokenClient;
import no.nav.common.types.identer.AktorId;
import no.nav.common.types.identer.EksternBrukerId;
import no.nav.common.types.identer.Fnr;
import no.nav.veilarbperson.client.aiabackend.AiaBackendClient;
import no.nav.veilarbperson.client.aiabackend.EndringIRegistreringsdataRequestDTO;
import no.nav.veilarbperson.client.digdir.DigdirClient;
import no.nav.veilarbperson.client.digdir.DigdirKontaktinfo;
import no.nav.veilarbperson.client.kodeverk.KodeverkClient;
Expand Down Expand Up @@ -195,22 +192,6 @@ public HealthCheckResult checkHealth() {
};
}

@Bean
public AiaBackendClient aiaBackendClient() {
return new AiaBackendClient() {
@NotNull
@Override
public Response hentEndringIRegistreringsdata(@NotNull EndringIRegistreringsdataRequestDTO endringIRegistreringsdataRequestDTO) {
return null;
}

@Override
public HealthCheckResult checkHealth() {
return HealthCheckResult.healthy();
}
};
}

@Bean
public PdlClient pdlClient() {
return new PdlClient() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
KodeverkService.class,
PersonV2Service.class,
CvJobbprofilService.class,
RegistreringService.class,
OppslagArbeidssoekerregisteretService.class
})
public class ServiceTestConfig {}

0 comments on commit 3c488ca

Please sign in to comment.