File tree Expand file tree Collapse file tree
apps/dolly-backend/src/main/java/no/nav/dolly/provider
proxies/dolly-proxy/src/main
java/no/nav/dolly/proxy/route Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414import no .nav .dolly .service .OrganisasjonBestillingService ;
1515import org .springframework .cache .annotation .CacheEvict ;
1616import org .springframework .cache .annotation .Cacheable ;
17+ import org .springframework .http .HttpStatus ;
1718import org .springframework .http .MediaType ;
1819import org .springframework .http .codec .ServerSentEvent ;
1920import org .springframework .transaction .annotation .Transactional ;
2324import org .springframework .web .bind .annotation .PostMapping ;
2425import org .springframework .web .bind .annotation .RequestMapping ;
2526import org .springframework .web .bind .annotation .RequestParam ;
27+ import org .springframework .web .bind .annotation .ResponseBody ;
28+ import org .springframework .web .bind .annotation .ResponseStatus ;
2629import org .springframework .web .bind .annotation .RestController ;
2730import reactor .core .publisher .Flux ;
2831import reactor .core .publisher .Mono ;
Original file line number Diff line number Diff line change 1+ package no .nav .dolly .proxy .route ;
2+
3+ import lombok .RequiredArgsConstructor ;
4+ import no .nav .dolly .proxy .auth .AuthenticationFilterService ;
5+ import org .springframework .cloud .gateway .route .Route ;
6+ import org .springframework .cloud .gateway .route .builder .Buildable ;
7+ import org .springframework .cloud .gateway .route .builder .PredicateSpec ;
8+ import org .springframework .stereotype .Component ;
9+
10+ import java .util .function .Function ;
11+
12+ @ Component
13+ @ RequiredArgsConstructor
14+ class Oppfoelging {
15+
16+ private static final String CLUSTER = "dev-gcp" ;
17+ private static final String NAMESPACE = "poao" ;
18+ private static final String NAME = "veilarboppfolging" ;
19+
20+ private final Targets targets ;
21+ private final AuthenticationFilterService authenticationFilterService ;
22+
23+ Function <PredicateSpec , Buildable <Route >> build () {
24+
25+ var bearerAuthenticationFilter = authenticationFilterService
26+ .getTrygdeetatenAuthenticationFilter (CLUSTER , NAMESPACE ,
27+ NAME , targets .getOppfoelging ());
28+
29+ return spec -> spec
30+ .path ("/oppfolging/**" )
31+ .filters (f -> f .stripPrefix (1 )
32+ .filter (bearerAuthenticationFilter ))
33+ .uri (targets .getOppfoelging ());
34+ }
35+ }
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ class RouteLocatorConfig {
2929 private final Norg2 norg2 ;
3030 private final Pdl pdl ;
3131 private final Pensjon pensjon ;
32+ private final Oppfoelging oppfoelging ;
3233 private final Saf saf ;
3334 private final Sigrunstub sigrunstub ;
3435 private final Skjermingsregister skjermingsregister ;
@@ -78,6 +79,7 @@ RouteLocator customRouteLocator(RouteLocatorBuilder builder) {
7879 .route ("pensjon-afp-q2" , pensjon .build (Pensjon .SpecialCase .AFP_Q2 ))
7980 .route ("pensjon-samboer-q1" , pensjon .build (Pensjon .SpecialCase .SAMBOER_Q1 ))
8081 .route ("pensjon-samboer-q2" , pensjon .build (Pensjon .SpecialCase .SAMBOER_Q2 ))
82+ .route ("oppfoelging" , oppfoelging .build ())
8183 .route ("saf-q1" , saf .build (Saf .SpecialCase .Q1 ))
8284 .route ("saf-q2" , saf .build (Saf .SpecialCase .Q2 ))
8385 .route ("saf-q4" , saf .build (Saf .SpecialCase .Q4 ))
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ class Targets {
4242 String pensjon ;
4343 String pensjonAfp ;
4444 String pensjonSamboer ;
45+ String oppfoelging ;
4546 String saf ;
4647 String sigrunstub ;
4748 String skjermingsregister ;
Original file line number Diff line number Diff line change 5454 krrstub : https://digdir-krr-stub.intern.dev.nav.no
5555 medl : https://medlemskap-medl-testdata.intern.dev.nav.no
5656 norg2 : http://norg2.org.svc.nais.local
57+ oppfoelging : https://veilarboppfolging.intern.dev.nav.no/veilarboppfolging
5758 pdl-api : http://pdl-api.pdl.svc.nais.local
5859 pdl-api-q1 : https://pdl-api-q1.pdl.svc.nais.local
5960 pdl-identhendelse : http://pdl-identhendelse-lager.pdl.svc.nais.local
You can’t perform that action at this time.
0 commit comments