mtrajano / laravel-swagger

Auto generates the swagger documentation of a laravel project based on best practices and simple assumptions
167 stars 71 forks source link

Auth option for session based internal API #55

Open carestad opened 3 years ago

carestad commented 3 years ago

Description:

Say you have an internal session based API on /api in your application, one would need to "log in" when running the command, especially if any of the validation rules use Auth::user().

A small local workaround by adding Auth::loginUsingId($userId) to SwaggerServiceProvider->boot() works, but is not very customizable. Would it be possible to add this as an auth option somehow?