Time for action — accessing a database with security enabled
Let's quickly try to access a database that has security enabled by passing the username and password with our request.
Open Terminal.
View all of the documents saved in the _users database by running the following command. Replace username and password with your admin's username and password.
You just issued a GET request to the _users database and used the username and password of the server admin that we created earlier to authenticate us. Once authenticated, we were able to access the data normally. If you want to perform any action on a secure database, you just need to prepend username:password@ before the URL of the resource you would like to work with.