Open palexander opened 11 years ago
It would be interesting if Goo supported encrypted passwords:
class User attribute :username, :unique => true attribute :password, :password => true end
Under the hood, Goo would encrypt the value passed to :password and store the hash. To authenticate a user, you could
:password
# Good user/pass combo u = User.where(username: "paul", password: "12345") => [ <User: "paul"> ] # Bad user/pass combo u = User.where(username: "paul", password: "54321") => [ ]
or a specialized method
# Good u = User.authenticate("paul", "12345") => <User: "paul"> # Bad u = User.authenticate("paul", "54321") => nil
Just food for thought, no priority at all
It would be interesting if Goo supported encrypted passwords:
Under the hood, Goo would encrypt the value passed to
:password
and store the hash. To authenticate a user, you couldor a specialized method
Just food for thought, no priority at all