Skip to content

Auth option for session based internal API #55

@carestad

Description

@carestad
  • Laravel Swagger Version: 0.6.4
  • Laravel Version: 8.12.3
  • PHP Version: 7.4.12

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions