Changeset View
Changeset View
Standalone View
Standalone View
src/routes/web.php
Show All 23 Lines | function () { | ||||
} | } | ||||
$env = \App\Utils::uiEnv(); | $env = \App\Utils::uiEnv(); | ||||
return view($env['view'])->with('env', $env); | return view($env['view'])->with('env', $env); | ||||
} | } | ||||
); | ); | ||||
} | } | ||||
); | ); | ||||
Route::group( | |||||
[ | |||||
'prefix' => 'oauth' | |||||
], | |||||
function () { | |||||
// We manually specify a subset of endpoints from https://github.com/laravel/passport/blob/11.x/routes/web.php | |||||
// after having disabled automatic routes via Passport::ignoreRoutes() | |||||
Route::post('/token', [ | |||||
'uses' => '\Laravel\Passport\Http\Controllers\AccessTokenController@issueToken', | |||||
'as' => 'token', | |||||
// 'middleware' => 'throttle', | |||||
]); | |||||
Route::middleware(['web', 'auth'])->group(function () { | |||||
Route::get('/tokens', [ | |||||
'uses' => '\Laravel\Passport\Http\Controllers\AuthorizedAccessTokenController@forUser', | |||||
'as' => 'tokens.index', | |||||
]); | |||||
Route::delete('/tokens/{token_id}', [ | |||||
'uses' => '\Laravel\Passport\Http\Controllers\AuthorizedAccessTokenController@destroy', | |||||
'as' => 'tokens.destroy', | |||||
]); | |||||
}); | |||||
} | |||||
); |