- To enable this grant add the following to the
config/oauth2.phpconfiguration file:
'grant_types' => [
'client_credentials' => [
'class' => '\League\OAuth2\Server\Grant\ClientCredentialsGrant',
'access_token_ttl' => 3600
]
]-
Next add a couple of
clientsto theoauth_clientstable. -
Finally set up a route to respond to the incoming access token requests.
Route::post('oauth/access_token', function() {
return Response::json(Authorizer::issueAccessToken());
});