I disagree - in this case, I think Scott is wrong. If we assume the password is WALLY then the quotes should surround the password and the full stop should follow to signify the end of the sentence. i.e. The password is "WALLY".
Of course the full stop is not part of the password! Wally's speaking! The woman asking the question can't see the full stop in the sentence! If there really was a full stop in the password he'd have to say something like "Wally, and then a full stop"
And as far as grammatical rules, its an interesting one. I think Scott has it correct though. With speech in prose, the punctuation does go inside the quotation marks. I don't know how it works when the quotation marks are being used to make a citation, but I imagine it's the same.
This is a prime example of how crazy the way you crazy english speaking peuple use quotation marks is. The dot inside the quotation implies the dot is part of the password, but if it were, Wally's sentence wouldn't have a period in the end. How would it be written if the dot was to be included? >>The password is "Wally.".<< would be wrong according to your crazy rules as the period ending the sentence would be outside the quotation. The only way i can find that would be somewhat correct is >>The password is "Wally.."<< which just looks stupid and even more confusing.
So, um, yeah. Punctuation outside quotation is "the new black"!
Being an engineer and a programmer, Dilbert would probably agree with me.