Revision 60959
Added by Konstantina Galouni almost 3 years ago
UserTokensService.java | ||
---|---|---|
21 | 21 |
import java.security.InvalidKeyException; |
22 | 22 |
import java.security.NoSuchAlgorithmException; |
23 | 23 |
import java.security.spec.InvalidKeySpecException; |
24 |
import java.util.Date; |
|
24 | 25 |
import java.util.List; |
25 | 26 |
|
26 | 27 |
@Service |
... | ... | |
97 | 98 |
} |
98 | 99 |
|
99 | 100 |
public void saveUserTokens(UserTokens userTokens) throws InvalidKeySpecException, NoSuchAlgorithmException, IllegalBlockSizeException, InvalidKeyException, BadPaddingException, InvalidAlgorithmParameterException, NoSuchPaddingException, IOException { |
101 |
userTokens.setCreationDate(new Date()); |
|
100 | 102 |
userTokens.setAaiId(rolesUtils.getAaiId()); |
101 | 103 |
userTokens = encryptTokens(userTokens); |
102 | 104 |
|
Also available in: Unified diff
[Trunk | Orcid Service]:
1. OrcidServiceCheckDeployController.java: [NEW] Controller added and
a. "hello()" method (@RequestMapping(value = {"", "/health_check"}, method = RequestMethod.GET)) which just prints and returns a greeting message.
b. "checkEverything()" method @RequestMapping(value = "/health_check/advanced", method = RequestMethod.GET) only accessible by PORTAL ADMINS which checks connection with db and prints properties.
2. ResultIdAndWork.java & Work.java: Added field "dashboard" (in ResultInWork class, default value is "production_explpre") and its getters and setters.
3. UserTokens.java: Added field "creationDate" and its getters and setters.
4. UserTokensService.java: Call setCreationDate() method with current Date in "saveUserTokens()" method.
5. WorkController.java: Call setDashboard() method with dashboard value from parameter of type ResultIdAndWork in "saveWork()" method.
6. update_db.js: Script with methods "setUserTokenCreationDate()" (use date of first work for this orcid) and "setDashboardInWorks()" (set all to "production_explore").