How to configure private licensed library in sonatype nexus

How do I configure a private library in Sonatype Nexus 3 which requires to login first and then download it ?

Hassan, you may want to refer to this chapter in the documentation, it has lots of information about this:
https://help.sonatype.com/repomanager3/nexus-repository-administration/access-control