API Authentication for user logged in to a Web App server

前端 未结 5 891
忘了有多久
忘了有多久 2020-12-02 19:40

I am building a Web App and a separate API (so that users can share their collected data with someone if they want to) using Ruby on Rails. The users can log in on the web a

5条回答
  •  情深已故
    2020-12-02 20:27

    If you to build json, xml based api, use rabl gem https://github.com/nesquena/rabl.

    For simpler authentication, go for session based authentication which rails provided with session variable in controller. If you want neat, some function for user, then go for authologic gem https://github.com/binarylogic/authlogic.

    If you want complete user management , then go for devise gem.

提交回复
热议问题