What is BasicAuth?
It is an open platform authentication method, which means you need to enter a username and password before accessing a restricted part of a software application or system.
Use in single route
If you need to use it for a single route, BasicAuth can register the middleware in the single route.
Use in routing group
In most cases, we use BasicAuth middleware in routing groups.
The access effect is the same as above.