How to secure the data in a rest web service with symfony2

I am developping a Restful web application with Symfony2 and I will use FosOAuthServerBundle and OAuth2,I started to read some tutorials, but one thing I didn’t understand,in my application I have already an authentication system in which the admin put his login and password,but the implementation of this bundle in my application adds a second authentification system to my app,for this reason as I have understood I should add a button in my login page to use this bundle and having the access token to protect my rest web service My question is,what are the advantages of this second authentification system,espitially my application is for one user “the administrator”?? My second question is,is it possible to combine this functionality with my login system that I have created from the beginning
during my research, I found many articles about the use of API keys, but I have not understood how they will protect data exchanged in the Web Service URL
So what is the best solution??OAuth2 with FOSUserbundle ou API keys
thanks a lot for help

I’m using JWT instead of OAuth.

This looks promising for Symfony though I’m using Laravel.

JWT is SO much simpler than Oauth. I recommend you at least check it out. Also it is perfect for modern, single page applications that need to connect to a rest client via JavaScript as the token is completely safe to pass via http.

Thanks for pointing out JWT, however I noticed this in the docs.

Protip: Though the bundle doesn’t enforce you to do so, it is highly recommended to use HTTPS.

Scott

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.