[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:
Cloners
is cloned by MGNLSTK-1127 integrate MailChangePasswordLinkStrat... Closed
dependency
depends upon MGNLFORM-142 Parameters in URL are everytime lost ... Closed
relation
is related to MGNLPUR-71 Password reminder sends the password ... Closed
is related to MGNLPUR-89 Allow configuration for multiple sites Closed
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 ]

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.

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.

Same on retrieval. user.getProperty("tokenExpiration")).getLong() should be used instead of getting property and then parsing output of its toString() method.

User#getProperty(String) returns java.lang.String therefore i cannot use getLong(). Thats why i parsed it by using Long.parseLong(String).

Generated at Mon Feb 12 06:42:47 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.