How to add admin user name and password field for particular Variable of Object?

I want to add Username and Password for the particular Variable of the Object.
Like when we get to see all other variables of that object on User Interface, only that variable will be password protected.
And when user wants to see the content of that field, he has to enter User Name and Password which was entered during submission of that field.

Output could be like:

Click Show button to show field “Show”

When clicked: Enter User Name and Password.

When User Name and Password is entered Correct: Field’s content is shown.

But, field should be displayed on the same page where “Show” button was there.

Source: AngularJS