Open Bug 565582 Opened 15 years ago Updated 3 years ago

Remove nsIAuthPrompt / nsIAuthPrompt2 implementation from login manager

Categories

(Toolkit :: Password Manager, defect, P5)

defect

Tracking

()

People

(Reporter: Dolske, Unassigned)

References

Details

(Whiteboard: [passwords:tech-debt])

Attachments

(1 obsolete file)

The integration of login manager with our prompting framework has always bugged me, as it's needlessly confusing. EG: 1) Caller invokes nsIPromptService's getPrompt(), requesting a nsIAuthPrompt[2]. 2) The prompt service delegates to pwmgr's nsIPromptFactory 3) Caller is given a pwmgr implementation of nsIAuthPrompt[2] 4) Caller invokes, say, promptUsernameAndPassword 5) Pwmgr sets up some strings and may autofill a login 6) Pwmgr invokes nsIPromptService's promptUsernameAndPassword ...user deals with dialog... 7) Prompt service's dialog returns, pwmgr may save a login 8) Pwmgr returns a result to original caller. I think it would be a simpler architecture to have the prompt service handle all the prompt-specific bits, and login manager should use an observer or events to handle (1) filling in a dialog before it's shown and (2) saving data from a dialog after it's dismissed. EG: 1) Caller invokes nsIPromptService's getPrompt() 2) Prompt service returns an instance of it's nsIAuthPrompt[2]. 3) Caller invokes, say, promptUsernameAndPassword 4) Prompt service notifies "beforeAuthDialog" observers 5) Pwmgr's observer may prefill the dialog with a login ...user deals with dialog... 6) Prompt service notifies "afterAuthDialog" observers 7) Pwmgr's observer may save the entered login
I should note that the fix for this would also involve moving login manger's asyncPromptAuth stuff over to to prompt service. nsLoginManagerPrompter would mostly just be an observer for the various prompt types.
Blocks: 587934
Attachment #544199 - Attachment is obsolete: true
Whiteboard: [passwords:tech-debt]
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: