Skip to content
Snippets Groups Projects
Commit 441b6b14 authored by Konstantinos's avatar Konstantinos Committed by Manuel Spuhler
Browse files

Add service without ENV parameters.

parent fa30c3f9
No related branches found
No related tags found
No related merge requests found
...@@ -35,8 +35,11 @@ docker build --build-arg BUILD_DATE=$(date -Iseconds) \ ...@@ -35,8 +35,11 @@ docker build --build-arg BUILD_DATE=$(date -Iseconds) \
--build-arg VERSION=$VERSION \ --build-arg VERSION=$VERSION \
--tag "$IMAGE:latest" \ --tag "$IMAGE:latest" \
--tag "$IMAGE:$VERSION" \ --tag "$IMAGE:$VERSION" \
--tag kkech/portal_backend:latest
. .
docker push kkech/portal_backend:latest
BUGSNAG_KEY="" BUGSNAG_KEY=""
eval $(grep -e "^\\s*BUGSNAG_KEY" Dockerfile | tr '\\' ' ') eval $(grep -e "^\\s*BUGSNAG_KEY" Dockerfile | tr '\\' ' ')
......
...@@ -38,4 +38,4 @@ public class JWTApi { ...@@ -38,4 +38,4 @@ public class JWTApi {
return ResponseEntity.status(HttpStatus.CREATED).body(token); return ResponseEntity.status(HttpStatus.CREATED).body(token);
} }
} }
\ No newline at end of file
...@@ -10,18 +10,18 @@ import com.google.gson.JsonElement; ...@@ -10,18 +10,18 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import eu.hbp.mip.model.Dataset; import eu.hbp.mip.model.Dataset;
import eu.hbp.mip.model.Query; import eu.hbp.mip.model.Query;
import eu.hbp.mip.model.StringDtoResponse;
import eu.hbp.mip.utils.DataUtil; import eu.hbp.mip.utils.DataUtil;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.Base64;
import java.util.Date; import java.util.Date;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
...@@ -121,4 +121,19 @@ public class RequestsApi { ...@@ -121,4 +121,19 @@ public class RequestsApi {
return prefix + memId; return prefix + memId;
} }
/**
* Get Galaxy Reverse Proxy basic access token.
*
* @return Return a @{@link ResponseEntity} with the token.
*/
@RequestMapping(method = RequestMethod.GET, produces = "application/json")
@ResponseStatus(value = HttpStatus.OK)
public ResponseEntity getGalaxyBasicAccessToken(){
String username = "admin";
String password = "admin";
String stringEncoded = Base64.getEncoder().encodeToString((username + ":" + password).getBytes());
return ResponseEntity.ok(new StringDtoResponse(stringEncoded));
}
} }
...@@ -4,6 +4,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; ...@@ -4,6 +4,7 @@ import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.Gson; import com.google.gson.Gson;
import eu.hbp.mip.configuration.SecurityConfiguration; import eu.hbp.mip.configuration.SecurityConfiguration;
import eu.hbp.mip.model.StringDtoResponse;
import eu.hbp.mip.model.User; import eu.hbp.mip.model.User;
import eu.hbp.mip.model.UserInfo; import eu.hbp.mip.model.UserInfo;
import eu.hbp.mip.repositories.UserRepository; import eu.hbp.mip.repositories.UserRepository;
...@@ -14,10 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -14,10 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.Cookie; import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -25,6 +23,7 @@ import java.io.IOException; ...@@ -25,6 +23,7 @@ import java.io.IOException;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.security.Principal; import java.security.Principal;
import java.util.Base64;
@RestController @RestController
public class SecurityApi { public class SecurityApi {
......
package eu.hbp.mip.model;
public class StringDtoResponse {
private String response;
public StringDtoResponse() {
}
public StringDtoResponse(String response) {
this.response = response;
}
public String getResponse() {
return response;
}
public void setResponse(String response) {
this.response = response;
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment