Reputation: 197
I would like to discuss what is the best way to secure your API's in order to be used from a mobile application.
Since there is not third-party I guess OAuth is not a good choice?
Would JWT be a good choice?
The hard part for me to understand is how can I authenticate so I can protect the data in my API's unless someone is authorized to call them.
I use Laravel 5.1 in server side and the mobile application that I want to call the API's is an android one.
I hope that I didn't forget to mention any important information. Any kind of help will be appreciated.
Upvotes: 6
Views: 4953
Reputation: 2222
Consider using OAuth 2 with Client Credentials Grant.
You can request an access token using your Client's credentials.
Use OAuth 2 Server Laravel:
Implementing an Authorization Server with the Client Credentials Grant using Luca's package:
Upvotes: 1
Reputation: 811
Take a look at JSON Web Token Authentication for Laravel & Lumen
It provides security and protection to data and routes.
Upvotes: 0