want to provide login credentials when someone wants to access some documents
Create the user and add the user to respective site with consumer permissions then they can access the documents in read only mode.
If they access the documents for read-only mode then its better to share link to user where user no need to login.
Go through below links related to permissions/roles:
User roles and permissions | Alfresco Documentation
Permissions / Roles | Alfresco Documentation
thank you kkumar
Retrieving data ...