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 80ef562833
commit fa1ad83006
1 changed files with 2 additions and 1 deletions

View File

@ -109,7 +109,7 @@ public class SendMail ***REMOVED***
private String retrieveApplicationToken() throws EMailException ***REMOVED***
try ***REMOVED***
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 ***REMOVED***
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 ***REMOVED***