How to set Authorization code for individual user?

I have been trying to assign each of my user with an authorization code each and set a extension only class of service for my users. Any body got any idea where can i change the setting to do this?

To make users enter a password before they go to the next step in a dial plan you do

Exten => X,1,Authorize(1234) ; Where X is the extension number and 1234 is the password.

As far as setting diffrent permisions for diffrent users I would group the users based on what permissions they have in to diffrent context’s