DarkaOnLine / L5-Swagger

OpenApi or Swagger integration to Laravel
https://github.com/DarkaOnLine/L5-Swagger
MIT License
2.64k stars 394 forks source link

adding built in web auth to the docs pages #510

Closed isaiahfisher closed 1 year ago

isaiahfisher commented 1 year ago

Description:

It appears that users are not required to be authenticated to access documentation. I would like to force users to authenticate using the normal web guard.

Steps To Reproduce:

Set up an application with default laravel authentication using Eloquent user model as a provider. Try to add the 'web' and 'auth' middleware to api and docs for l5-swagger configs.

Expected:

user should not be allowed to access page unless they are already logged into the application.

Actual:

anyone is able to access the documentation without needing to authenticate.

Further questions:

Am I doing something wrong? I see that there is a security section, but I just want to use the existing application authentication. The documentation is designed to expose api endpoints to application end users for automating common business to business operations that are normally performed in the web UI of this application. Unauthenticated users should not be able to access the documentation.

ronaldwanink commented 1 year ago

@isaiahfisher Same here, did you manage to get this to work?