I want to customize my auth middleware that secure my endpoint.
for example, i want to accept requests that have specific bearer token. how can i do?
i’m using dingo api library.
Advertisement
Answer
Go to kernel.php file in HTTP directory. You’ll see something like this.
'auth' => ExampleClass::class,
Find the ExampleClass and read its handle method. After you figure it out how it works, create your own middleware and implement your own logic in it. Read the laravel middlewares document for more information.