Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth option for session based internal API #55

Open
carestad opened this issue Nov 26, 2020 · 0 comments
Open

Auth option for session based internal API #55

carestad opened this issue Nov 26, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@carestad
Copy link

carestad commented Nov 26, 2020

  • 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?

@carestad carestad added the bug Something isn't working label Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant