API Token Based Access Laravel 5.1
Alfred Nutile wrote a new tutorial on how to handle token-based API access with Laravel 5.
Laravel 5.2 introduces the auth token guard setup which is way simpler than Oauth. Also it does not assume a certain level of complexity in needs like Scopes and expirations of tokens that we do not need for our internal app to app communications.
We are using 5.1 so this will implement it.
See some docs here https://gistlog.co/JacobBennett/090369fbab0b31130b51
For creating a user the AppServiceProvider boots the user record and if no api_token is present it will set one. As well as the UUID (we use https://packagist.org/packages/ramsey/uuid for this)
This post is submitted by one of our members. You may submit a new post here.