-
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.
Feature/landingsside for bankid palogging som feiler (#3706)
Rettet flere bugs ved bankID pålogging
- Loading branch information
Showing
68 changed files
with
722 additions
and
312 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
services: | ||
|
||
cloud_sql_proxy: | ||
image: gcr.io/cloud-sql-connectors/cloud-sql-proxy:2.14.2 | ||
network_mode: host | ||
command: | ||
- "dolly-dev-ff83:europe-north1:testnav-altinn3-tilgang-local" | ||
- "--credentials-file=/application_default_credentials.json" | ||
- "--run-connection-test" | ||
volumes: | ||
- type: bind | ||
# Set a variable $DOLLY_APPLICATION_CREDENTIALS. We don't use | ||
# GOOGLE_APPLICATION_CREDENTIALS, as this causes an extra step during login. | ||
# | ||
# - $HOME/.config/gcloud/application_default_credentials.json for Linux/macOS. | ||
# - $APPDATA/gcloud/application_default_credentials.json for Windows. | ||
source: $DOLLY_APPLICATION_CREDENTIALS | ||
target: /application_default_credentials.json |
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
40 changes: 40 additions & 0 deletions
40
...av/testnav/altinn3tilgangservice/consumer/altinn/command/GetAuthorizedPartiesCommand.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,40 @@ | ||
package no.nav.testnav.altinn3tilgangservice.consumer.altinn.command; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
import no.nav.testnav.altinn3tilgangservice.consumer.altinn.dto.AltinnAuthorizedPartiesRequestDTO; | ||
import no.nav.testnav.altinn3tilgangservice.consumer.altinn.dto.AuthorizedPartyDTO; | ||
import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; | ||
import org.springframework.http.HttpHeaders; | ||
import org.springframework.http.MediaType; | ||
import org.springframework.web.reactive.function.client.WebClient; | ||
import reactor.core.publisher.Mono; | ||
|
||
import java.util.concurrent.Callable; | ||
|
||
@Slf4j | ||
@RequiredArgsConstructor | ||
public class GetAuthorizedPartiesCommand implements Callable<Mono<AuthorizedPartyDTO[]>> { | ||
|
||
private static final String ALTINN_URL = "/accessmanagement/api/v1/resourceowner/authorizedparties"; | ||
|
||
private final WebClient webClient; | ||
private final AltinnAuthorizedPartiesRequestDTO request; | ||
private final String token; | ||
|
||
@Override | ||
public Mono<AuthorizedPartyDTO[]> call() { | ||
|
||
log.info("Spørring på bruker {}", request); | ||
return webClient | ||
.post() | ||
.uri(builder -> builder.path(ALTINN_URL) | ||
.build()) | ||
.header(HttpHeaders.AUTHORIZATION, "Bearer " + token) | ||
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) | ||
.bodyValue(request) | ||
.retrieve() | ||
.bodyToMono(AuthorizedPartyDTO[].class) | ||
.doOnError(WebClientFilter::logErrorMessage); | ||
} | ||
} |
Empty file.
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.