I will take a look at it. This code was published when there was a salt:ing discussion going on regarding record.
I have not done much work in lift involving record and user authentication lately but I think there may be some newer and better ways to handle it in lift 2.5 maybe David W can elaborate on that.
> On Saturday, October 6, 2012 8:37:50 AM UTC-4, Kevin Lau wrote:
> Hi,
> Ver 2.4 is good.
> Problem occurred "User.scala:218: not found: value
> salt [error] salt.is/salt.get <http://salt.is/salt.get>" when
> upgrade to Upgrade to Ver 2.5-M1.
I just took a quick look at the code and the reason it dose not compile for lift 2.5-M1 is that there are no longer a concrete value member 'salt' in the net.liftweb.record.field.PasswordTypedField trait and I am not sure how to get around this.
There is probably some new slicker mechanism for retrieving/holding the salt in lift 2.5 record
... maybe someone already have a blog post or something showing how it should be done in 2.5 ?
> On Saturday, October 6, 2012 8:37:50 AM UTC-4, Kevin Lau wrote:
> Hi,
> Ver 2.4 is good.
> Problem occurred "User.scala:218: not found: value
> salt [error] salt.is/salt.get <http://salt.is/salt.get>" when
> upgrade to Upgrade to Ver 2.5-M1.
Resolved:
After taking a close look at this I found out that the password filed is salted by default (in 2.5) so you do not need to extend it with your own trait :)
so in class User modify the password field like this:
:
val password = new PasswordField(this) //with MyPasswordTypedField[User]
:
i.e remove the trait extension.
I will do a initial clean up of the example code in a moment and get back to it later to get rid of more dead code.
> On Saturday, October 6, 2012 8:37:50 AM UTC-4, Kevin Lau wrote:
> Hi,
> Ver 2.4 is good.
> Problem occurred "User.scala:218: not found: value
> salt [error] salt.is/salt.get <http://salt.is/salt.get>" when
> upgrade to Upgrade to Ver 2.5-M1.
... my conclusion that the password field is salted by default may be a bit hasty (still using hashpw with BCrypt for that)
... anyway you do not need to override the match_? function and other stuff in PasswordTypedField anymore to have a salted password.
> Resolved:
> After taking a close look at this I found out that the password filed > is salted by default (in 2.5) so you do not need to extend it with > your own trait :)
> so in class User modify the password field like this:
> :
> val password = new PasswordField(this) //with > MyPasswordTypedField[User]
> :
> i.e remove the trait extension.
> I will do a initial clean up of the example code in a moment and get > back to it later to get rid of more dead code.
> best regards
> Peter Petersson
> On 10/06/2012 11:14 PM, Kevin Lau wrote:
>> I use committer Peter P's sample code.
>> On Saturday, October 6, 2012 8:37:50 AM UTC-4, Kevin Lau wrote:
>> Hi,
>> Ver 2.4 is good.
>> Problem occurred "User.scala:218: not found: value
>> salt [error] salt.is/salt.get <http://salt.is/salt.get>" when
>> upgrade to Upgrade to Ver 2.5-M1.
> ... my conclusion that the password field is salted by default may be > a bit hasty (still using hashpw with BCrypt for that)
> ... anyway you do not need to override the match_? function and other > stuff in PasswordTypedField anymore to have a salted password.
> best regards
> Peter Petersson
> On 10/07/2012 10:05 PM, Peter Petersson wrote:
>> Resolved:
>> After taking a close look at this I found out that the password filed >> is salted by default (in 2.5) so you do not need to extend it with >> your own trait :)
>> so in class User modify the password field like this:
>> :
>> val password = new PasswordField(this) //with >> MyPasswordTypedField[User]
>> :
>> i.e remove the trait extension.
>> I will do a initial clean up of the example code in a moment and get >> back to it later to get rid of more dead code.
>> best regards
>> Peter Petersson
>> On 10/06/2012 11:14 PM, Kevin Lau wrote:
>>> I use committer Peter P's sample code.
>>> On Saturday, October 6, 2012 8:37:50 AM UTC-4, Kevin Lau wrote:
>>> Hi,
>>> Ver 2.4 is good.
>>> Problem occurred "User.scala:218: not found: value
>>> salt [error] salt.is/salt.get
>>> <http://salt.is/salt.get>" when upgrade to Upgrade to Ver
>>> 2.5-M1.
> ... my conclusion that the password field is salted by default may be a > bit hasty (still using hashpw with BCrypt for that) > ... anyway you do not need to override the match_? function and other > stuff in PasswordTypedField anymore to have a salted password.
> best regards > Peter Petersson
> On 10/07/2012 10:05 PM, Peter Petersson wrote:
> Resolved: > After taking a close look at this I found out that the password filed is > salted by default (in 2.5) so you do not need to extend it with your own > trait :)
> so in class User modify the password field like this: > : > val password = new PasswordField(this) //with > MyPasswordTypedField[User] > : > i.e remove the trait extension.
> I will do a initial clean up of the example code in a moment and get back > to it later to get rid of more dead code.
> ... my conclusion that the password field is salted by default may be a bit
> hasty (still using hashpw with BCrypt for that)
> ... anyway you do not need to override the match_? function and other stuff
> in PasswordTypedField anymore to have a salted password.
> best regards
> Peter Petersson
> On 10/07/2012 10:05 PM, Peter Petersson wrote:
> Resolved:
> After taking a close look at this I found out that the password filed is
> salted by default (in 2.5) so you do not need to extend it with your own
> trait :)
> so in class User modify the password field like this:
> :
> val password = new PasswordField(this) //with MyPasswordTypedField[User]
> :
> i.e remove the trait extension.
> I will do a initial clean up of the example code in a moment and get back to
> it later to get rid of more dead code.