This is a bit out of scope for us, because this is not something that should be controlled through Swagger UI.
At the end of the day, Swagger UI is a collection of static html/css/js files hosted by your application. To add access control to those pages, you'd need to configure your application (or web server) to do so. Since there are so many languages and web servers out there, we're unable to provide specific details for each and every case, however, it should be fairly easy to find the information online based on your tool of choice.
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓