Hyperlink that includes a password

Hi there! My client requires that certain parts of the site have to be blocked using a password. He also wants specific visitors to have access to that content by scanning a QR code. In other words, the hyperlink must also contain the password (for example ‘1234’. How do I do that?

Any help would be great!