Laravel API Authentication: Issuing Access Tokens

Managing Clients

This consists of providing the name of their application and a URL that your application can redirect to after users approve their request for authorization.

JSON API

May use to create clients.

Requesting Tokens

Refreshing Tokens

$http = new GuzzleHttp\Client;

$response = $http->post('http://your-app.com/oauth/token', [
    'form_params' => [
        'grant_type' => 'refresh_token',
        'refresh_token' => 'the-refresh-token',
        'client_id' => 'client-id',
        'client_secret' => 'client-secret',
        'scope' => '',
    ],
]);

return json_decode((string) $response->getBody(), true);

Laravel API Authentication: Issuing Access Tokens — Structure map

Clickable & Draggable!

Laravel API Authentication: Issuing Access Tokens — Related pages: