سؤال

I use devise and rails app for authenticate users from mobile; so the user sign up/sign in/ sign out from their mobile devices, the problem is for (sign up/sign in) so that the user send his plain text password over the wire, how can I encrypt the plain text password and decrypt it on the server side? I am very new to RoR and Devise.

هل كانت مفيدة؟

المحلول

I'm not sure what you are trying to accomplish when you say "send plaint text password over wire" but below [1] is a good tutorial for creating a json api with devise. It uses the old token_authenticable module which has been removed from devise so follow this gist [2] to make modifications.

[1]http://lucatironi.github.io/tutorial/2012/10/15/ruby_rails_android_app_authentication_devise_tutorial_part_one/

[2]https://gist.github.com/josevalim/fb706b1e933ef01e4fb6

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top