nsIAuthInformation.ONLY_PASSWORD

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

nsIAuthInformation.ONLY_PASSWORD

Patrick Wang-4
Hi All,

I am writing a test case for an asyncPromptAuth() implementation with sjs files,
and I am try to simulate a scenario that the prompt shows only password field,
that is, nsIAuthInformation.ONLY_PASSWORD is set when the authInfo is passed to
asyncPromptAuth(). But I don't know how to let caller pass such authInfo.
Could anybody tell me how to make caller pass an AuthInfo with ONLY_PASSWORD set?

Thanks,
Patrick
_______________________________________________
dev-tech-network mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-network
Reply | Threaded
Open this post in threaded view
|

Re: nsIAuthInformation.ONLY_PASSWORD

Christian Biesinger-2
On Fri, Aug 17, 2012 at 3:16 AM, Patrick Wang <[hidden email]> wrote:
> I am writing a test case for an asyncPromptAuth() implementation with sjs files,
> and I am try to simulate a scenario that the prompt shows only password field,
> that is, nsIAuthInformation.ONLY_PASSWORD is set when the authInfo is passed to
> asyncPromptAuth(). But I don't know how to let caller pass such authInfo.
> Could anybody tell me how to make caller pass an AuthInfo with ONLY_PASSWORD set?

So, this only happens for (certain) FTP requests, basically for
ftp://[hidden email]/ when the server asks for a password. I don't
think we have an FTP server for tests (maybe we do?)

Why do you need an actual caller? Can't your test directly call your
auth prompt implementation? Though I don't really understand how SJS
files relate to auth prompts.

-christian
_______________________________________________
dev-tech-network mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-network
Reply | Threaded
Open this post in threaded view
|

Re: nsIAuthInformation.ONLY_PASSWORD

Patrick Wang-4
Thank you for the information. Because this asyncPromptAuth communicates
with other elements in the DOM tree, it need to run in a browser. I use
Mochitest and SJS file to generate Http 401 response and let
asyncPromptAuth get called, to test if our asyncPromptAuth implementation
handle it correctly.

Patrick

----- Original Message -----
From: "Christian Biesinger" <[hidden email]>
To: [hidden email]
Sent: Friday, August 17, 2012 9:34:04 PM
Subject: Re: nsIAuthInformation.ONLY_PASSWORD

On Fri, Aug 17, 2012 at 3:16 AM, Patrick Wang <[hidden email]> wrote:
> I am writing a test case for an asyncPromptAuth() implementation with sjs files,
> and I am try to simulate a scenario that the prompt shows only password field,
> that is, nsIAuthInformation.ONLY_PASSWORD is set when the authInfo is passed to
> asyncPromptAuth(). But I don't know how to let caller pass such authInfo.
> Could anybody tell me how to make caller pass an AuthInfo with ONLY_PASSWORD set?

So, this only happens for (certain) FTP requests, basically for
ftp://[hidden email]/ when the server asks for a password. I don't
think we have an FTP server for tests (maybe we do?)

Why do you need an actual caller? Can't your test directly call your
auth prompt implementation? Though I don't really understand how SJS
files relate to auth prompts.

-christian
_______________________________________________
dev-tech-network mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-network
_______________________________________________
dev-tech-network mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-network