dimanche 25 septembre 2016

laravel 5.3 Api routes not returning "unauthorized access" error.

I'm trying to create an api with laravel 5.3 and I've just created a new fresh Laravel 5.3 project and have added the below route to the routes/api.php file.

Route::get('/',function(){
    return view('welcome');
});

When I hit this url http://localhost/api/ on my browser I was navigated to the default laravel home page of my application.

Now my question is, shouldn't I get an "Unauthorized access" error when I try to access a route in the api.php file without passing a token? Why is laravel letting me navigate to the api route even when I'm not passing a token?

Note: I have not added laravel passport or any other oAuth libraries to the project yet.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire