ref 19186: DMPoolManager - Use the dataminer user to send emails.

https://support.d4science.org/issues/19186

Added application token
This commit is contained in:
Giancarlo Panichi 2020-05-04 18:45:03 +02:00
parent e7f927f48b
commit c2ca14e3cd
1 changed files with 2 additions and 1 deletions

View File

@ -109,7 +109,7 @@ public class SendMail {
private String retrieveApplicationToken() throws EMailException {
try {
logger.info("Retrieve Application Token");
SimpleQuery query = queryFor(ServiceEndpoint.class);
query.addCondition(DMPOOLMANAGER_SERVICE_QUERY_CONDITION);
DiscoveryClient<ServiceEndpoint> client = clientFor(ServiceEndpoint.class);
@ -130,6 +130,7 @@ public class SendMail {
Property p = iteratorProps.next();
String applicationToken = StringEncrypter.getEncrypter().decrypt(p.value());
logger.debug("Application token found: " + applicationToken);
logger.info("Application Token retrieved");
return applicationToken;
***REMOVED*** else {