Skip to content
Snippets Groups Projects
Commit 7f5e466f authored by jerrypan's avatar jerrypan Committed by Manuel Spuhler
Browse files

making username pass for galaxy baseauth parametrized

parent fd235f63
No related branches found
No related tags found
No related merge requests found
......@@ -35,10 +35,10 @@ docker build --build-arg BUILD_DATE=$(date -Iseconds) \
--build-arg VERSION=$VERSION \
--tag "$IMAGE:latest" \
--tag "$IMAGE:$VERSION" \
--tag jerrypan44/portal_backend:latest \
--tag jerrypan44/portal-backend:latest \
.
docker push jerrypan44/portal_backend:latest
docker push jerrypan44/portal-backend:latest
BUGSNAG_KEY=""
eval $(grep -e "^\\s*BUGSNAG_KEY" Dockerfile | tr '\\' ' ')
......
......@@ -95,5 +95,6 @@ services:
jwtSecret: {{ default .Env.JWT_SECRET "secret" }}
workflowAuthorization: {{ default .Env.WORKFLOW_AUTHORIZATION "undefined" }}
galaxy:
galaxyUsername: {{ default .Env.GALAXY_USERNAME admin }}
galaxyPassword: {{ default .Env.GALAXY_PASSWORD admin }}
galaxyUsername: {{ default .Env.GALAXY_USERNAME "admin" }}
galaxyPassword: {{ default .Env.GALAXY_PASSWORD "admin" }}
......@@ -123,10 +123,10 @@ public class RequestsApi {
}
@Value("#{'${services.galaxy.galaxyUsername:admin}'}")
private boolean galaxyUsername;
private String galaxyUsername;
@Value("#{'${services.galaxy.galaxyPassword:admin}'}")
private boolean galaxyPassword;
private String galaxyPassword;
/**
* Get Galaxy Reverse Proxy basic access token.
......
......@@ -2,18 +2,19 @@ package eu.hbp.mip.utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.auth0.jwt.algorithms.Algorithm;
import com.auth0.jwt.JWT;
//import com.auth0.jwt.algorithms.Algorithm;
//import com.auth0.jwt.JWT;
public class JWTUtil {
private static final Logger LOGGER = LoggerFactory.getLogger(JWT.class);
//private static final Logger LOGGER = LoggerFactory.getLogger(JWT.class);
public static String getJWT(String secret, String subject) {
LOGGER.info("getJWT");
Algorithm algorithm = Algorithm.HMAC512(secret);
String token = JWT.create().withIssuer("mip.humanbrainproject.eu").withSubject(subject).sign(algorithm);
//LOGGER.info("getJWT");
// Algorithm algorithm = Algorithm.HMAC512(secret);
// String token = JWT.create().withIssuer("mip.humanbrainproject.eu").withSubject(subject).sign(algorithm);
return token;
// return token;
return "";
}
}
\ No newline at end of file
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