adjusted vault config

This commit is contained in:
Sebastian Stenzel
2021-08-24 12:39:29 +02:00
parent fa86d890fe
commit 056990151a
3 changed files with 6 additions and 6 deletions

View File

@@ -87,9 +87,9 @@ class AuthFlowReceiver implements AutoCloseable {
res.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
if (error == null && code != null) {
res.setHeader("Location", hubConfig.unlockSuccessUrl);
res.setHeader("Location", hubConfig.authSuccessUrl);
} else {
res.setHeader("Location", hubConfig.unlockErrorUrl);
res.setHeader("Location", hubConfig.authErrorUrl);
}
callback.add(new Callback(error, code, state));

View File

@@ -7,7 +7,7 @@ public class HubConfig {
public String authEndpoint;
public String tokenEndpoint;
public String deviceRegistrationUrl;
public String unlockSuccessUrl;
public String unlockErrorUrl;
public String authSuccessUrl;
public String authErrorUrl;
}

View File

@@ -23,8 +23,8 @@ public class AuthFlowIntegrationTest {
hubConfig.authEndpoint = "http://localhost:8080/auth/realms/cryptomator/protocol/openid-connect/auth";
hubConfig.tokenEndpoint = "http://localhost:8080/auth/realms/cryptomator/protocol/openid-connect/token";
hubConfig.clientId = "cryptomator-hub";
hubConfig.unlockSuccessUrl = "http://localhost:3000/#/unlock-success";
hubConfig.unlockErrorUrl = "http://localhost:3000/#/unlock-error";
hubConfig.authSuccessUrl = "http://localhost:3000/#/unlock-success";
hubConfig.authErrorUrl = "http://localhost:3000/#/unlock-error";
try (var authFlow = AuthFlow.init(hubConfig)) {
var token = authFlow.run(uri -> {