Skip to content

Commit

Permalink
Legger inn fp-tilgang (#1360)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsladek committed Apr 27, 2024
1 parent 8032cf0 commit 9b481f4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,18 @@ private static OpenIDConfiguration createStsConfiguration(String wellKnownUrl) {
@SuppressWarnings("unused")
private static OpenIDConfiguration createAzureAppConfiguration(String wellKnownUrl) {
var proxyUrl = ENV.isFss() ? URI.create(ENV.getProperty(AZURE_HTTP_PROXY, getDefaultProxy())) : null;
return createConfiguration(OpenIDProvider.AZUREAD, Optional.ofNullable(getAzureProperty(AzureProperty.AZURE_OPENID_CONFIG_ISSUER))
return createConfiguration(OpenIDProvider.AZUREAD,
Optional.ofNullable(getAzureProperty(AzureProperty.AZURE_OPENID_CONFIG_ISSUER))
.orElseGet(() -> getIssuerFra(wellKnownUrl, proxyUrl).orElse(null)),
Optional.ofNullable(getAzureProperty(AzureProperty.AZURE_OPENID_CONFIG_JWKS_URI))
.orElseGet(() -> getJwksFra(wellKnownUrl, proxyUrl).orElse(null)),
Optional.ofNullable(getAzureProperty(AzureProperty.AZURE_OPENID_CONFIG_TOKEN_ENDPOINT))
.orElseGet(() -> getTokenEndpointFra(wellKnownUrl, proxyUrl).orElse(null)), ENV.isFss(), proxyUrl,
getAzureProperty(AzureProperty.AZURE_APP_CLIENT_ID), getAzureProperty(AzureProperty.AZURE_APP_CLIENT_SECRET), ENV.isLocal());
.orElseGet(() -> getTokenEndpointFra(wellKnownUrl, proxyUrl).orElse(null)),
ENV.isFss(),
proxyUrl,
getAzureProperty(AzureProperty.AZURE_APP_CLIENT_ID),
getAzureProperty(AzureProperty.AZURE_APP_CLIENT_SECRET),
ENV.isLocal());
}

private static String getAzureProperty(AzureProperty property) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public enum FpApplication {
FPDOKGEN,
FPWSPROXY,
FPOVERSIKT,
FPTILGANG,
NONFP;

private static final Environment ENV = Environment.current();
Expand All @@ -30,16 +31,17 @@ public enum FpApplication {

private static Integer lokalPort(FpApplication application) {
return switch (application) {
case FPSAK -> 8080;
case FPFORMIDLING -> 8010;
case FPABAKUS -> 8015;
case FPKALKULUS -> 8016;
case FPFORMIDLING -> 8010;
case FPRISK -> 8075;
case FPTILBAKE -> 8030;
case FPTILGANG -> 8050;
case FPABONNENT -> 8065;
case FPFORDEL -> 8090;
case FPLOS -> 8071;
case FPOPPDRAG -> 8070;
case FPTILBAKE -> 8030;
case FPLOS -> 8071;
case FPRISK -> 8075;
case FPSAK -> 8080;
case FPFORDEL -> 8090;
case FPDOKGEN -> 8291;
case FPWSPROXY -> 8292;
case FPOVERSIKT -> 8889;
Expand Down

0 comments on commit 9b481f4

Please sign in to comment.