the password slice is pretty hackable.  I also had a legacy user
model, more full featured than the salted user mixin.  You simply
comment out the mixin in merb/merb-auth/setup.rb and roll your own
authenticate method.  My User authenticate looks as follows:

  def self.authenticate(email, password)
    if user = self.activated.first(:email => email)
      if validate_password(password, user.password_hash,
user.password_salt)
        return user
      end
    end
    false
  end

I will publish on github a full app showing my user behavior.
Unfortunately, you'll need to wait a few more days for me to organize
my code.

Jon

On Dec 15, 8:59 pm, Cyril Mougel <[email protected]> wrote:
> ztroy wrote:
> > I am using merb-slice-password to handle authentication for a merb
> > app. This works just fine, but I'd like to use an existing mysql user
> > table where I am storing crypted_password and salt as 40 characters
> > varchar as stated by default by restful_authentication. I was just
> > wondering if it would be possibile to "hack" merb-auth encryption
> > method to use the same as restful_authentication so that I can easily
> > let my user log in into my merb app by using their default username
> > and password as they setup those by signing up through
> > restful_authentication.Or do I need to use instead a "unified"
> > authentication solution like Authlogic?
>
> See about strategie. The strategie define how fetch user information.
>
> --
> Cyril Mougelhttp://blog.shingara.fr
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to