prod SSL and added lmsType to RunningExamInfo
This commit is contained in:
parent
cc14f47b77
commit
104fe6512d
10 changed files with 64 additions and 32 deletions
|
@ -1,18 +1,21 @@
|
||||||
|
spring.profiles.include=prod-ws,prod-gui
|
||||||
|
|
||||||
server.address=0.0.0.0
|
server.address=0.0.0.0
|
||||||
server.port=80
|
server.port=443
|
||||||
server.servlet.context-path=/
|
server.servlet.context-path=/
|
||||||
|
|
||||||
#security.require-ssl=true
|
security.require-ssl=true
|
||||||
#server.ssl.key-store-type=PKCS12
|
server.ssl.key-store-type=PKCS12
|
||||||
#server.ssl.key-store=file:/sebserver/seb-server-keystore.pkcs12
|
server.ssl.key-store=file:/certs/seb-server-keystore.pkcs12
|
||||||
#server.ssl.key-alias=1
|
server.ssl.key-store-password=[SET_PWD]
|
||||||
|
server.ssl.key-alias=1
|
||||||
|
|
||||||
|
|
||||||
file.encoding=UTF-8
|
file.encoding=UTF-8
|
||||||
|
|
||||||
javax.net.ssl.keyStore=seb-server-keystore.pkcs12
|
javax.net.ssl.keyStore=/certs/seb-server-keystore.pkcs12
|
||||||
javax.net.ssl.keyStorePassword=[SET_PWD]
|
javax.net.ssl.keyStorePassword=[SET_PWD]
|
||||||
javax.net.ssl.trustStore=seb-server-truststore.pkcs12
|
javax.net.ssl.trustStore=/certs/seb-server-truststore.pkcs12
|
||||||
javax.net.ssl.trustStorePassword=[SET_PWD]
|
javax.net.ssl.trustStorePassword=[SET_PWD]
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,10 +36,10 @@ datastore.mariadb.server.port=3306
|
||||||
# data source configuration
|
# data source configuration
|
||||||
spring.datasource.initialize=true
|
spring.datasource.initialize=true
|
||||||
spring.datasource.initialization-mode=always
|
spring.datasource.initialization-mode=always
|
||||||
spring.datasource.url=jdbc:mariadb://${datastore.mariadb.server.address}:${datastore.mariadb.server.port}/SEBServer?createDatabaseIfNotExist=true&verifyServerCertificate=true&useSSL=true&requireSSL=true
|
spring.datasource.url=jdbc:mariadb://${datastore.mariadb.server.address}:${datastore.mariadb.server.port}/SEBServer?createDatabaseIfNotExist=true&verifyServerCertificate=false&useSSL=true&requireSSL=true&trustServerCertificate=true
|
||||||
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
|
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
|
||||||
spring.datasource.platform=prod
|
spring.datasource.platform=prod
|
||||||
spring.datasource.hikari.initializationFailTimeout=30000
|
spring.datasource.hikari.initializationFailTimeout=1
|
||||||
spring.datasource.hikari.connectionTimeout=30000
|
spring.datasource.hikari.connectionTimeout=30000
|
||||||
spring.datasource.hikari.idleTimeout=600000
|
spring.datasource.hikari.idleTimeout=600000
|
||||||
spring.datasource.hikari.maxLifetime=1800000
|
spring.datasource.hikari.maxLifetime=1800000
|
||||||
|
@ -45,8 +48,8 @@ spring.datasource.hikari.maxLifetime=1800000
|
||||||
sebserver.webservice.distributed=false
|
sebserver.webservice.distributed=false
|
||||||
sebserver.webservice.http.scheme=https
|
sebserver.webservice.http.scheme=https
|
||||||
sebserver.webservice.http.server.name=${server.address}
|
sebserver.webservice.http.server.name=${server.address}
|
||||||
|
|
||||||
sebserver.webservice.http.redirect.gui=/gui
|
sebserver.webservice.http.redirect.gui=/gui
|
||||||
|
sebserver.webservice.api.admin.clientId=guiClient
|
||||||
sebserver.webservice.api.admin.endpoint=/admin-api/v1
|
sebserver.webservice.api.admin.endpoint=/admin-api/v1
|
||||||
sebserver.webservice.api.admin.accessTokenValiditySeconds=3600
|
sebserver.webservice.api.admin.accessTokenValiditySeconds=3600
|
||||||
sebserver.webservice.api.admin.refreshTokenValiditySeconds=25200
|
sebserver.webservice.api.admin.refreshTokenValiditySeconds=25200
|
||||||
|
@ -73,7 +76,7 @@ server.servlet.session.tracking-modes=cookie
|
||||||
|
|
||||||
sebserver.gui.entrypoint=/gui
|
sebserver.gui.entrypoint=/gui
|
||||||
sebserver.gui.webservice.protocol=https
|
sebserver.gui.webservice.protocol=https
|
||||||
sebserver.gui.webservice.address=localhost
|
sebserver.gui.webservice.address=${server.address}
|
||||||
sebserver.gui.webservice.port=80
|
sebserver.gui.webservice.port=80
|
||||||
sebserver.gui.webservice.apipath=/admin-api/v1
|
sebserver.gui.webservice.apipath=/admin-api/v1
|
||||||
# defines the polling interval that is used to poll the webservice for client connection data on a monitored exam page
|
# defines the polling interval that is used to poll the webservice for client connection data on a monitored exam page
|
||||||
|
|
|
@ -8,6 +8,8 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./certs:/certs
|
- ./certs:/certs
|
||||||
environment:
|
environment:
|
||||||
|
- SERVER_CN=seb-server-mariadb
|
||||||
|
- CLIENT_CN=seb-server-mariadb
|
||||||
- KEYSTORE_PWD=[SET_PWD]
|
- KEYSTORE_PWD=[SET_PWD]
|
||||||
|
|
||||||
mariadb:
|
mariadb:
|
||||||
|
@ -35,6 +37,7 @@ services:
|
||||||
container_name: seb-server
|
container_name: seb-server
|
||||||
volumes:
|
volumes:
|
||||||
- .:/config
|
- .:/config
|
||||||
|
- ./certs:/certs
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
networks:
|
networks:
|
||||||
|
|
|
@ -3,8 +3,8 @@ FROM openjdk:11-jre-stretch
|
||||||
RUN apt-get update && apt-get install -y openssl
|
RUN apt-get update && apt-get install -y openssl
|
||||||
|
|
||||||
ENV KEYSTORE_PWD=
|
ENV KEYSTORE_PWD=
|
||||||
ENV SERVER_CN="localhost"
|
ENV SERVER_CN="seb-server-mariadb"
|
||||||
ENV CLIENT_CN="localhost"
|
ENV CLIENT_CN="seb-server-mariadb"
|
||||||
ENV OPENSSL_SUBJ="/C=CH/ST=Zuerich/L=Zuerich"
|
ENV OPENSSL_SUBJ="/C=CH/ST=Zuerich/L=Zuerich"
|
||||||
ENV OPENSSL_CA="${OPENSSL_SUBJ}/CN=demo-CA"
|
ENV OPENSSL_CA="${OPENSSL_SUBJ}/CN=demo-CA"
|
||||||
ENV OPENSSL_SERVER="${OPENSSL_SUBJ}/CN=${SERVER_CN}"
|
ENV OPENSSL_SERVER="${OPENSSL_SUBJ}/CN=${SERVER_CN}"
|
||||||
|
|
|
@ -12,8 +12,9 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
import ch.ethz.seb.sebserver.gbl.model.exam.Exam;
|
import ch.ethz.seb.sebserver.gbl.model.exam.Exam;
|
||||||
|
import ch.ethz.seb.sebserver.gbl.model.institution.LmsSetup.LmsType;
|
||||||
|
|
||||||
public final class RunningExam {
|
public final class RunningExamInfo {
|
||||||
|
|
||||||
@JsonProperty("examId")
|
@JsonProperty("examId")
|
||||||
public final String examId;
|
public final String examId;
|
||||||
|
@ -21,22 +22,27 @@ public final class RunningExam {
|
||||||
public final String name;
|
public final String name;
|
||||||
@JsonProperty("url")
|
@JsonProperty("url")
|
||||||
public final String url;
|
public final String url;
|
||||||
|
@JsonProperty("lmsType")
|
||||||
|
public final String lmsType;
|
||||||
|
|
||||||
@JsonCreator
|
@JsonCreator
|
||||||
public RunningExam(
|
public RunningExamInfo(
|
||||||
@JsonProperty("examId") final String examId,
|
@JsonProperty("examId") final String examId,
|
||||||
@JsonProperty("name") final String name,
|
@JsonProperty("name") final String name,
|
||||||
@JsonProperty("url") final String url) {
|
@JsonProperty("url") final String url,
|
||||||
|
@JsonProperty("lmsType") final String lmsType) {
|
||||||
|
|
||||||
this.examId = examId;
|
this.examId = examId;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.url = url;
|
this.url = url;
|
||||||
|
this.lmsType = lmsType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RunningExam(final Exam exam) {
|
public RunningExamInfo(final Exam exam, final LmsType lmsType) {
|
||||||
this.examId = exam.getModelId();
|
this.examId = exam.getModelId();
|
||||||
this.name = exam.name;
|
this.name = exam.name;
|
||||||
this.url = exam.startURL;
|
this.url = exam.startURL;
|
||||||
|
this.lmsType = (lmsType == null) ? "" : lmsType.name();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getExamId() {
|
public String getExamId() {
|
||||||
|
@ -51,6 +57,10 @@ public final class RunningExam {
|
||||||
return this.url;
|
return this.url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getLmsType() {
|
||||||
|
return this.lmsType;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
final StringBuilder builder = new StringBuilder();
|
final StringBuilder builder = new StringBuilder();
|
||||||
|
@ -60,6 +70,8 @@ public final class RunningExam {
|
||||||
builder.append(this.name);
|
builder.append(this.name);
|
||||||
builder.append(", url=");
|
builder.append(", url=");
|
||||||
builder.append(this.url);
|
builder.append(this.url);
|
||||||
|
builder.append(", lmsType=");
|
||||||
|
builder.append(this.lmsType);
|
||||||
builder.append("]");
|
builder.append("]");
|
||||||
return builder.toString();
|
return builder.toString();
|
||||||
}
|
}
|
|
@ -40,10 +40,11 @@ import ch.ethz.seb.sebserver.gbl.model.session.ClientConnection;
|
||||||
import ch.ethz.seb.sebserver.gbl.model.session.ClientConnectionData;
|
import ch.ethz.seb.sebserver.gbl.model.session.ClientConnectionData;
|
||||||
import ch.ethz.seb.sebserver.gbl.model.session.ClientEvent;
|
import ch.ethz.seb.sebserver.gbl.model.session.ClientEvent;
|
||||||
import ch.ethz.seb.sebserver.gbl.model.session.PingResponse;
|
import ch.ethz.seb.sebserver.gbl.model.session.PingResponse;
|
||||||
import ch.ethz.seb.sebserver.gbl.model.session.RunningExam;
|
import ch.ethz.seb.sebserver.gbl.model.session.RunningExamInfo;
|
||||||
import ch.ethz.seb.sebserver.gbl.profile.WebServiceProfile;
|
import ch.ethz.seb.sebserver.gbl.profile.WebServiceProfile;
|
||||||
import ch.ethz.seb.sebserver.gbl.util.Utils;
|
import ch.ethz.seb.sebserver.gbl.util.Utils;
|
||||||
import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ExamDAO;
|
import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ExamDAO;
|
||||||
|
import ch.ethz.seb.sebserver.webservice.servicelayer.dao.LmsSetupDAO;
|
||||||
import ch.ethz.seb.sebserver.webservice.servicelayer.dao.SebClientConfigDAO;
|
import ch.ethz.seb.sebserver.webservice.servicelayer.dao.SebClientConfigDAO;
|
||||||
import ch.ethz.seb.sebserver.webservice.servicelayer.session.ExamSessionService;
|
import ch.ethz.seb.sebserver.webservice.servicelayer.session.ExamSessionService;
|
||||||
import ch.ethz.seb.sebserver.webservice.servicelayer.session.SebClientConnectionService;
|
import ch.ethz.seb.sebserver.webservice.servicelayer.session.SebClientConnectionService;
|
||||||
|
@ -56,6 +57,7 @@ public class ExamAPI_V1_Controller {
|
||||||
private static final Logger log = LoggerFactory.getLogger(ExamAPI_V1_Controller.class);
|
private static final Logger log = LoggerFactory.getLogger(ExamAPI_V1_Controller.class);
|
||||||
|
|
||||||
private final ExamDAO examDAO;
|
private final ExamDAO examDAO;
|
||||||
|
private final LmsSetupDAO lmsSetupDAO;
|
||||||
private final ExamSessionService examSessionService;
|
private final ExamSessionService examSessionService;
|
||||||
private final SebClientConnectionService sebClientConnectionService;
|
private final SebClientConnectionService sebClientConnectionService;
|
||||||
private final SebClientConfigDAO sebClientConfigDAO;
|
private final SebClientConfigDAO sebClientConfigDAO;
|
||||||
|
@ -63,12 +65,14 @@ public class ExamAPI_V1_Controller {
|
||||||
|
|
||||||
protected ExamAPI_V1_Controller(
|
protected ExamAPI_V1_Controller(
|
||||||
final ExamDAO examDAO,
|
final ExamDAO examDAO,
|
||||||
|
final LmsSetupDAO lmsSetupDAO,
|
||||||
final ExamSessionService examSessionService,
|
final ExamSessionService examSessionService,
|
||||||
final SebClientConnectionService sebClientConnectionService,
|
final SebClientConnectionService sebClientConnectionService,
|
||||||
final SebClientConfigDAO sebClientConfigDAO,
|
final SebClientConfigDAO sebClientConfigDAO,
|
||||||
final JSONMapper jsonMapper) {
|
final JSONMapper jsonMapper) {
|
||||||
|
|
||||||
this.examDAO = examDAO;
|
this.examDAO = examDAO;
|
||||||
|
this.lmsSetupDAO = lmsSetupDAO;
|
||||||
this.examSessionService = examSessionService;
|
this.examSessionService = examSessionService;
|
||||||
this.sebClientConnectionService = sebClientConnectionService;
|
this.sebClientConnectionService = sebClientConnectionService;
|
||||||
this.sebClientConfigDAO = sebClientConfigDAO;
|
this.sebClientConfigDAO = sebClientConfigDAO;
|
||||||
|
@ -80,7 +84,7 @@ public class ExamAPI_V1_Controller {
|
||||||
method = RequestMethod.POST,
|
method = RequestMethod.POST,
|
||||||
consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE,
|
consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE,
|
||||||
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
||||||
public Collection<RunningExam> handshakeCreate(
|
public Collection<RunningExamInfo> handshakeCreate(
|
||||||
@RequestParam(name = API.PARAM_INSTITUTION_ID, required = false) final Long instIdRequestParam,
|
@RequestParam(name = API.PARAM_INSTITUTION_ID, required = false) final Long instIdRequestParam,
|
||||||
@RequestParam(name = API.EXAM_API_PARAM_EXAM_ID, required = false) final Long examIdRequestParam,
|
@RequestParam(name = API.EXAM_API_PARAM_EXAM_ID, required = false) final Long examIdRequestParam,
|
||||||
@RequestBody(required = false) final MultiValueMap<String, String> formParams,
|
@RequestBody(required = false) final MultiValueMap<String, String> formParams,
|
||||||
|
@ -116,18 +120,18 @@ public class ExamAPI_V1_Controller {
|
||||||
remoteAddr);
|
remoteAddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<RunningExam> result;
|
List<RunningExamInfo> result;
|
||||||
if (examId == null) {
|
if (examId == null) {
|
||||||
result = this.examSessionService.getRunningExamsForInstitution(institutionId)
|
result = this.examSessionService.getRunningExamsForInstitution(institutionId)
|
||||||
.getOrThrow()
|
.getOrThrow()
|
||||||
.stream()
|
.stream()
|
||||||
.map(exam -> new RunningExam(exam))
|
.map(this::createRunningExamInfo)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
} else {
|
} else {
|
||||||
final Exam exam = this.examDAO.byPK(examId)
|
final Exam exam = this.examDAO.byPK(examId)
|
||||||
.getOrThrow();
|
.getOrThrow();
|
||||||
|
|
||||||
result = Arrays.asList(new RunningExam(exam));
|
result = Arrays.asList(createRunningExamInfo(exam));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.isEmpty()) {
|
if (result.isEmpty()) {
|
||||||
|
@ -146,6 +150,14 @@ public class ExamAPI_V1_Controller {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private RunningExamInfo createRunningExamInfo(final Exam exam) {
|
||||||
|
return new RunningExamInfo(
|
||||||
|
exam,
|
||||||
|
this.lmsSetupDAO.byPK(exam.lmsSetupId)
|
||||||
|
.map(lms -> lms.lmsType)
|
||||||
|
.getOr(null));
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(
|
@RequestMapping(
|
||||||
path = API.EXAM_API_HANDSHAKE_ENDPOINT,
|
path = API.EXAM_API_HANDSHAKE_ENDPOINT,
|
||||||
method = RequestMethod.PATCH,
|
method = RequestMethod.PATCH,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
spring.application.name=SEB Server
|
spring.application.name=SEB Server
|
||||||
spring.profiles.active=dev
|
spring.profiles.active=prod
|
||||||
|
|
||||||
spring.mandatory-file-encoding=UTF-8
|
spring.mandatory-file-encoding=UTF-8
|
||||||
spring.http.encoding.charset=UTF-8
|
spring.http.encoding.charset=UTF-8
|
||||||
|
|
|
@ -14,7 +14,7 @@ INSERT IGNORE INTO user_role VALUES
|
||||||
;
|
;
|
||||||
|
|
||||||
INSERT IGNORE INTO seb_client_configuration VALUES
|
INSERT IGNORE INTO seb_client_configuration VALUES
|
||||||
(1, 1, 'test', '2019-07-02 09:22:50', 'test', '98ac3c953abf5948d9d13c81cab580819ee2624c76d6d4147d4896a5b79f49956d382c08c93cb3b9ae350b32', null, 1)
|
(1, 1, 'test', '2019-07-02 09:22:50', 'test', '20faa63098beb54053d228d078d9471a6b35bde8cf2e91a879789e721e54c6535660d8d69e4670484a87977a', null, 1)
|
||||||
;
|
;
|
||||||
|
|
||||||
INSERT IGNORE INTO view VALUES
|
INSERT IGNORE INTO view VALUES
|
||||||
|
|
|
@ -43,7 +43,7 @@ import org.springframework.util.MultiValueMap;
|
||||||
|
|
||||||
import ch.ethz.seb.sebserver.gbl.Constants;
|
import ch.ethz.seb.sebserver.gbl.Constants;
|
||||||
import ch.ethz.seb.sebserver.gbl.api.API;
|
import ch.ethz.seb.sebserver.gbl.api.API;
|
||||||
import ch.ethz.seb.sebserver.gbl.model.session.RunningExam;
|
import ch.ethz.seb.sebserver.gbl.model.session.RunningExamInfo;
|
||||||
import ch.ethz.seb.sebserver.gbl.util.Utils;
|
import ch.ethz.seb.sebserver.gbl.util.Utils;
|
||||||
|
|
||||||
public class HTTPClientBot {
|
public class HTTPClientBot {
|
||||||
|
@ -252,11 +252,11 @@ public class HTTPClientBot {
|
||||||
log.info("ConnectionBot {} : init connection", this.name);
|
log.info("ConnectionBot {} : init connection", this.name);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final ResponseEntity<Collection<RunningExam>> exchange = this.restTemplate.exchange(
|
final ResponseEntity<Collection<RunningExamInfo>> exchange = this.restTemplate.exchange(
|
||||||
this.handshakeURI,
|
this.handshakeURI,
|
||||||
HttpMethod.POST,
|
HttpMethod.POST,
|
||||||
this.connectBody,
|
this.connectBody,
|
||||||
new ParameterizedTypeReference<Collection<RunningExam>>() {
|
new ParameterizedTypeReference<Collection<RunningExamInfo>>() {
|
||||||
});
|
});
|
||||||
|
|
||||||
final HttpStatus statusCode = exchange.getStatusCode();
|
final HttpStatus statusCode = exchange.getStatusCode();
|
||||||
|
@ -264,7 +264,7 @@ public class HTTPClientBot {
|
||||||
throw new RuntimeException("Webservice answered with error: " + exchange.getBody());
|
throw new RuntimeException("Webservice answered with error: " + exchange.getBody());
|
||||||
}
|
}
|
||||||
|
|
||||||
final Collection<RunningExam> body = exchange.getBody();
|
final Collection<RunningExamInfo> body = exchange.getBody();
|
||||||
final String token = exchange.getHeaders().getFirst(API.EXAM_API_SEB_CONNECTION_TOKEN);
|
final String token = exchange.getHeaders().getFirst(API.EXAM_API_SEB_CONNECTION_TOKEN);
|
||||||
|
|
||||||
log.info("ConnectionBot {} : successfully created connection, token: {} body: {} ", this.name, token,
|
log.info("ConnectionBot {} : successfully created connection, token: {} body: {} ", this.name, token,
|
||||||
|
|
|
@ -62,7 +62,8 @@ public class SebConnectionTest extends ExamAPIIntegrationTester {
|
||||||
// check correct response
|
// check correct response
|
||||||
assertTrue(HttpStatus.OK.value() == createConnection.getStatus());
|
assertTrue(HttpStatus.OK.value() == createConnection.getStatus());
|
||||||
final String contentAsString = createConnection.getContentAsString();
|
final String contentAsString = createConnection.getContentAsString();
|
||||||
assertEquals("[{\"examId\":\"2\",\"name\":\"Demo Quiz 6\",\"url\":\"http://lms.mockup.com/api/\"}]",
|
assertEquals(
|
||||||
|
"[{\"examId\":\"2\",\"name\":\"Demo Quiz 6\",\"url\":\"http://lms.mockup.com/api/\",\"lmsType\":\"MOCKUP\"}]",
|
||||||
contentAsString);
|
contentAsString);
|
||||||
|
|
||||||
// check connection token
|
// check connection token
|
||||||
|
@ -109,7 +110,8 @@ public class SebConnectionTest extends ExamAPIIntegrationTester {
|
||||||
// check correct response
|
// check correct response
|
||||||
assertTrue(HttpStatus.OK.value() == createConnection.getStatus());
|
assertTrue(HttpStatus.OK.value() == createConnection.getStatus());
|
||||||
final String contentAsString = createConnection.getContentAsString();
|
final String contentAsString = createConnection.getContentAsString();
|
||||||
assertEquals("[{\"examId\":\"2\",\"name\":\"Demo Quiz 6\",\"url\":\"http://lms.mockup.com/api/\"}]",
|
assertEquals(
|
||||||
|
"[{\"examId\":\"2\",\"name\":\"Demo Quiz 6\",\"url\":\"http://lms.mockup.com/api/\",\"lmsType\":\"MOCKUP\"}]",
|
||||||
contentAsString);
|
contentAsString);
|
||||||
|
|
||||||
// check connection token
|
// check connection token
|
||||||
|
|
|
@ -20,8 +20,8 @@ public class ClientCredentialServiceTest {
|
||||||
// @Test
|
// @Test
|
||||||
// public void testEncryptSimpleSecret() {
|
// public void testEncryptSimpleSecret() {
|
||||||
// final Environment envMock = mock(Environment.class);
|
// final Environment envMock = mock(Environment.class);
|
||||||
// when(envMock.getRequiredProperty(ClientCredentialServiceImpl.SEBSERVER_WEBSERVICE_INTERNAL_SECRET_KEY))
|
// when(envMock.getProperty(ClientCredentialServiceImpl.SEBSERVER_WEBSERVICE_INTERNAL_SECRET_KEY))
|
||||||
// .thenReturn("internalSecret");
|
// .thenReturn("somePW");
|
||||||
//
|
//
|
||||||
// final ClientCredentialService service = new ClientCredentialServiceImpl(envMock);
|
// final ClientCredentialService service = new ClientCredentialServiceImpl(envMock);
|
||||||
// final CharSequence encrypt = service.encrypt("test");
|
// final CharSequence encrypt = service.encrypt("test");
|
||||||
|
|
Loading…
Add table
Reference in a new issue