我正在开发一个rails web应用程序,它也为移动设备提供了基于JSON的API.移动客户端需要先使用(Email/PASS)获取令牌,然后客户端将使用该令牌进行后续API调用.
I am pretty new to Devise, and I am looking for a Devise API look like authenticate(email, pass)
and expect it to return true/false, then based on that I will either create and hand back the token or return a decline message. but seems Devise doesn't provide something like this.
我知道Devise1.3提供了基于JSON的身份验证,但这与我需要的稍有不同-我需要生成令牌并处理回客户端,然后在身份验证完成后使用令牌.
谁能给点建议吗?