I'm new with symfony2 and i am trying to connect with FOSUserBundle via a rest api. The web browser authentication is working fine and I can create users with FOSUserBundle. In fact I want to build a webservice with Symfony. How can I connect a user vie rest ? Is it a bundle to use rest with symfony2 easily?
Thanks.
Use of basic authentication is specified as follows: The string "Basic " is added to the Authorization header of the request. The username and password are combined into a string with the format "username:password", which is then base64 encoded and added to the Authorization header of the request.
Users of the REST API can authenticate by providing a user ID and password to the REST API login resource with the HTTP POST method. An LTPA token is generated that enables the user to authenticate future requests. This LTPA token has the prefix LtpaToken2 .
I would suggest using "Wsse" as authorization method.
You can read about that at this post. There is even a bundle that provide wsse routines.
About make REST-ful your app, i would suggest using FosRestBundle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With