Skybound.Gecko.PromptService.PromptAuth C# (CSharp) Méthode

PromptAuth() public méthode

public PromptAuth ( nsIDOMWindow aParent, nsIChannel aChannel, uint level, nsIAuthInformation authInfo, string checkboxLabel, System &aCheckValue ) : bool
aParent nsIDOMWindow
aChannel nsIChannel
level uint
authInfo nsIAuthInformation
checkboxLabel string
aCheckValue System
Résultat bool
        public bool PromptAuth(nsIDOMWindow aParent, nsIChannel aChannel, uint level, nsIAuthInformation authInfo, string checkboxLabel, ref System.Boolean aCheckValue)
        {
            string userName = nsString.Get(authInfo.GetUsernameAttribute);
            string password = nsString.Get(authInfo.GetPasswordAttribute);

            string realm = nsString.Get(authInfo.GetRealmAttribute);

            if (PromptUsernameAndPassword(aParent, "Server Authentication", "The server '" + realm + "' requires a user name and password.", ref userName, ref password, checkboxLabel, ref aCheckValue))
            {
                nsString.Set(authInfo.SetUsernameAttribute, userName);
                nsString.Set(authInfo.SetPasswordAttribute, password);
                return true;
            }

            return false;
        }