This is an automated email from the ASF dual-hosted git repository.
bhliva pushed a commit to branch dlab_refactored
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/dlab_refactored by this push:
new 8c446c8 DLAB-000 changed hardcoded value for keycloak server
8c446c8 is described below
commit 8c446c8d67a76696f6472c9481c1e74a2457076b
Author: bhliva <[email protected]>
AuthorDate: Fri Aug 2 14:54:05 2019 +0300
DLAB-000 changed hardcoded value for keycloak server
---
.../java/com/epam/dlab/backendapi/service/KeycloakServiceImpl.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/KeycloakServiceImpl.java
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/KeycloakServiceImpl.java
index f518bd0..829a8c2 100644
---
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/KeycloakServiceImpl.java
+++
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/KeycloakServiceImpl.java
@@ -15,7 +15,7 @@ import javax.ws.rs.core.Response;
public class KeycloakServiceImpl implements KeycloakService {
- private static final String URI =
"http://52.11.45.11:8080/auth/realms/DLAB_bhliva/protocol/openid-connect/token";
+ private static final String URI =
"/realms/DLAB_bhliva/protocol/openid-connect/token";
private final Client httpClient;
private final KeycloakConfiguration conf;
@@ -38,7 +38,7 @@ public class KeycloakServiceImpl implements KeycloakService {
private AccessTokenResponse requestToken(Form requestForm) {
final String credentials =
Base64.encodeAsString(String.join(":", conf.getResource(),
String.valueOf(conf.getCredentials().get("secret"))));
- final Response response = httpClient.target(URI).request()
+ final Response response =
httpClient.target(conf.getAuthServerUrl() + URI).request()
.header(HttpHeaders.AUTHORIZATION, "Basic " +
credentials)
.post(Entity.form(requestForm));
if (response.getStatusInfo().getFamily() !=
Response.Status.Family.SUCCESSFUL) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]