I'm building a simple iPhone app that synchronizes to a webservice served by Symfony 1.4. This app requires the user to be logged in.
My question is, how can the user log in Symfony from the iPhone app? And how can I keep the session opened through the next petitions? Is this secure?
Chapter 15 of the Practical Symfony book talks about webservices, but I can't find any guide about sessions.
Thanks in advance
You can use SOAP web service also. But this is little complex. You can send the file attached to XForm and Post to the service
Detailed implementation of SOAP in PHP
http://www.vankouteren.eu/blog/2009/03/simple-php-soap-example/
You can build a rest service for symfony modules. You can get login through REST service.
Your example service will be like this
www.example.com?username=user&password=pass
Related
I'm developing an iPhone app which allows users to login to a web service by using the token and api
http://localhost:3000/api/v1/tokens.json?email=tok_apple2009#hotmail.co.uk&password=111111
http://localhost:3000/api/test.json?auth_token=h8uTVFseoMiLvRquK4Vt
However I'm having trouble in this part, could anyone could please help me?
Thanks
You can use AFNetworking(https://github.com/AFNetworking/AFNetworking) framework for communicating with webservices.
My web application is developed using AribaWeb framework and I want to integrate my application with Facebook. I need to post some info to my product's wall when i'm saving my sample page. I have some doubts to do this,
Is there any need of Web services. if so what are they?
Is it possible to do without JavaScript?
Study the facebook API. I am sure there is a REST service that allows you to do that. Then you can send a REST request from your application using available REST frameworks such as RESTeasy or Jersey .
Supposed there is a page which is only accessible for authenticated users on a Drupal site. What library/tools are available for iPhone developers to:
login the Drupal site (username password)
access the page with a loggin status
For example, I'd like to fill a UITableView with data from the Drupal page. Thanks!
You need a way to communicate with Drupal. You can do this with the "Services module". Download it from the drupal community.
After that, on your iPhone app, you need a protocol to retrive and send data to Drupal. The most used with the Services module is XMLRPC, but you can do it with Json and even plist. In the iPhone side we're using a Cocoa XML-RPC Client Framework made by Eric J. Czarny, from Divisible by Zero.
This way you have default methods (node.get, user.login....) to retrieve info from Drupal. You can create your own modules too.
It's not complicated. We have created an app that communicates with Drupal, but its a bit extended to explain it in just a few lines.
Start by downloading the Services module, configuring it and testing with XMLRPC Server. After that, the basic work is done.
Good luck :)
I want to configure a simple webapplication to support an iphone app to connect with it in RESTFUL ways. Initially have a user login session enabled from the iphone to the web app. I'd like the iphone app to send a NSURL call to the webapp, with user and password and have the webapp respond if the suer exists or not. Pretty simple. And I want to do it with web2py. Is this possible? Any clues?
I think you should post it to web2py group on google groups.
web2py#googlegroups.com
I know this question is a bit old now, but Massimo recently posted a video demonstrating a new experimental RESTful API for web2py. See also the Google groups posting "video about new RESTful APIs" .
I wan the following functionality in my iphone application
User Register/signup form my application to the website(mysql/php)
User login to the site from application.
User write comment on pictures from application.
Please help me out.
The easiest way is to extend your website to support some flavor of web service (REST, SOAP, etc) Then your app can simply call the web service methods to do the various operations you listed.