securing an API #2205
Unanswered
SySafarila
asked this question in
Q&A
securing an API
#2205
Replies: 1 comment
-
Can is working, look at the tests |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, can i use this laravel-permission package to secure my api ? because i tried using middleware like :
Route::get('/test', function() { return response()->json('testing'); })->middleware('auth:api', 'can:admin access');
its returned unauthorized response, but if i usemiddleware('auth:api', 'role:admin')
its returned "testing" and this is what i want, but on my web.php i usually use thecan:xxx
to secure the routes and this is not work in api.phpBeta Was this translation helpful? Give feedback.
All reactions