[MGNLPUR-69] Provide a way to change password without sending it as plain text Created: 30/Jul/12 Updated: 28/Feb/13 Resolved: 07/Dec/12 |
|
| Status: | Closed |
| Project: | Magnolia Public User Registration |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.3.2, 1.4.2 |
| Type: | Improvement | Priority: | Major |
| Reporter: | Ondrej Chytil | Assignee: | Jaroslav Simak |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Template: |
|
||||||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||||||||||
| Comments |
| Comment by Jan Haderka [ 07/Dec/12 ] |
userManager.setProperty(u, "token", ValueFactoryImpl.getInstance().createValue(token)); Why do you use internal JR specific class to set value of String property instead of setting it directly? Same for long few lines above. Long.parseLong(user.getProperty("tokenExpiration"))
Same on retrieval. user.getProperty("tokenExpiration")).getLong() should be used instead of getting property and then parsing output of its toString() method. |
| Comment by Jaroslav Simak [ 07/Dec/12 ] |
Because User#setProperty(String, String) is deprecated and UserManager.setProperty(User, String, Value) takes 3rd arg of type javax.jcr.Value and i have to create it somehow. So i used that JR class.
User#getProperty(String) returns java.lang.String therefore i cannot use getLong(). Thats why i parsed it by using Long.parseLong(String). |