Reputation: 10566
I'm writing application which consists of server side on Google App Engine (Java) and client side on Android. They communicate using RESTful web service.
And I really confused with authentication in this application. How I can implement authentication on Client side so:
Upvotes: 0
Views: 351
Reputation: 41
Maybe you could pass to the server the authentication token that you get from FB on the client side? Then you could use UrlFetch on the server side to make calls to FB API. (I don't know if it's safe)
I created GAE-GWT-FB stack, so it's a bit different, but if you want to take a look it's here GWT-GAE-FB
Upvotes: 0
Reputation: 17367
You can implement or use an existing adndroid AccountAuthenticator. See this example on android documentation.
Basically, your server side authentication service will return a token to the client if authentication succeeds. The Android AuthenticationManager will store the token for you. Your AccountAuthenticatior will check if the user is logged in. If not, it will launch an activity to request the user to give username, password or whatever you need to log in.
Upvotes: 1