You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by bh...@apache.org on 2019/08/02 11:54:16 UTC

[incubator-dlab] branch dlab_refactored updated: DLAB-000 changed hardcoded value for keycloak server

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 <bo...@epam.com>
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: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org