Skip to content

Commit

Permalink
Frontend location logikk håndteres litt anderledes
Browse files Browse the repository at this point in the history
  • Loading branch information
larsLotNav committed Apr 27, 2022
1 parent a0700c6 commit ffec42c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ protected Authentication oauth2callback(HttpServletRequest request, HttpServletR
}

JsonObject tokenResponse = JsonObject.read(tokenRequest);
logger.info(tokenResponse.toJson());

String id_token = tokenResponse.requiredString("id_token");
response.addCookie(createCookie(request, ID_TOKEN_COOKIE, id_token));
response.sendRedirect(frontEndUrl + "/Dashboard/Privatperson/");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ public static DataSource create(Map<String, String> props) {

Properties properties = new Properties();
props.forEach(properties::put);
String passwordName = properties.get("passwordName").toString();
properties.remove("passwordName");
properties.put("password", System.getenv(passwordName));
properties.put("password", System.getenv("dbpass"));

int count = 0;
int maxTries = 10;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public PortalServer() {
swaggerDocumentation
));
setupConfiguration();
setFrontEndLocation();
}

private void setupConfiguration() {
Expand Down
2 changes: 1 addition & 1 deletion portal.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dataSource.jdbcUrl = jdbc:postgresql://127.0.0.1:5432/navstatus
dataSource.username = postgres
dataSource.driverClassName= org.postgresql.Driver
dataSource.maximumPoolSize=32
dataSource.passwordName=dbpass



frontendLocationLocal = http://localhost:3000
Expand Down

0 comments on commit ffec42c

Please sign in to comment.