質問

We are building an iPhone app and need to create our own REST API to handle logins etc. The backend is in Java and we need a way to login users to the iPhone application and allow them to make requests to the API as that user. Because there are no sessions in mobile what would be the best way to implement this?

役に立ちましたか?

解決 2

I used HMAC to make sure security and integrity could be guaranteed while communicating between the mobile device and the API. To handle logins we use an access token that expires after a set period

他のヒント

You can use RESTEasy for the java backend. If you're on a https server you can simply use Basic Auth. if SSL is not an option you have to use an HMAC implementation. Here's an example in php+js

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top