History | Log In     View a printable version of the current page.  
Issue Details (XML)

Key: SDK-14481
Type: Bug Bug
Status: Closed Closed
Resolution: External
Priority: C C
Assignee: Joan Lafferty
Reporter: Jeremiah Small
Votes: 1
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Flex SDK

URLRequestDefaults and some new properties of URLRequest are listed in the Flex 3 Docs but not available in Flex 3 beta 3 SDK

Created: 01/28/08 10:07 PM   Updated: 01/31/08 02:28 PM
Component/s: ASDoc Content, Web Compilers
Security Level: Public (All JIRA Users )

Severity: Non Functioning
Reproducibility: Every Time
Discoverability: High
Found in Version: (Planning) SDK 3.0 Candidates
Affected OS(s): All OS Platforms
Steps to Reproduce:
Steps to reproduce:
1. Create a Flex Project using the Flex 3 beta 3 SDK
2. Create a URLRequest instance, and try to access the authentication property.
3. Try to use the URLRequestDefaults.setLoginCredentialsForHost() method.
 
 Actual Results:

 Neither the authentication property of URLRequest nor the entire URLRequestDefaults class come up in code completion.

 If you try to import flash.net.URLRequestDefaults or compile the above app, it will throw errors at compile time, not recognizing the new class or properties as valid.

 If you use the AIR compiler, they are available (but obviously won't run on FlashPlayer)
 
 Expected Results:
 
 We need to be able to do basic http authentication for Web apps. The Flex 3 documentation indicates that URLRequestDefaults "lets you define default authentication credentials for requests" and that URLRequest.authenticate:

" Specifies whether authentication requests should be handled (true or not (false) for this request. If false, authentication challenges return an HTTP error.

The supported authentication methods are:

    * Windows—HTTP Basic/Digest, Windows Integrated Authentication (including NTLM and Kerberos), SSL Certificate Authentication.
    * Mac—HTTP Basic/Digest, NTLM, SSL Certificate Authentication.

Note:The FileReference.upload(), FileReference.download(), and HTMLLoader.load() methods do not support the URLRequest.authenticate property.

The default value is true."

The documentation makes no distinction between FlashPlayer and AIR, and we hope that there will not be one in the final implementation.
 
 Workaround (if any):

 Currently there is no way we have figured out to do basic authentication in a useful way. Before it was restricted in a recent release of FlashPlayer, we were modifying the headers like this:

            public function basicAuthentication(username:String,password:String):void {
             var encoder:Base64Encoder = new Base64Encoder();
             encoder.encode(username + ":" + password);
             var value:String = encoder.drain();
             //trace('Base64 value:' + value);
             this.addHeader("Authorization","Basic " + value);
            }
 
 This no longer works.

 The only thing we have worked out to do basic http authentication so far is to concatenate username:password@url, but aside from being lame, this is no longer supported on IE, therefore it is not a viable solution.

 Further more, without the ability to prevent a 401 response from bubbling (is this the right term?) up to the browser, there is no way to handle invalid credentials. The browser takes over and presents the user with a basic authentication dialog. If the user cancels that, there is no elegant way to determine what to do, essentially leaving the app in a fictional logged-in state.

 We are desperately hoping for a supported way to do basic http authentication. If this is not it, please tell us what is.

 You can look at our issue demostrator app here http://shn.serveftp.net/flexfm/FMBasicAuth.html
 If you log in with something other than the suggested valid credentials you will experience the basic auth prompt from the browser. Will not work at all on IE.
Language Found: English
Bugbase Id: none
QA Owner: Joan Lafferty
Resolved by: Joan Lafferty
Fixed Version: SDK Moxie RC3 - Next Build
Confirmed Version: SDK Moxie RC3 - 192625
Participants: Jeremiah Small and Joan Lafferty


 All   Comments      Sort Order:
Joan Lafferty - [01/31/08 01:35 PM ]
These APIs are for AIR only and are not supported by the web player yet, so, this is not a Flex bug. I have logged a Flash Player enhancement request to support these properties in the future.

Jeremiah Small - [01/31/08 02:28 PM ]
If it's not a bug in the API, it should be specified in the Documentation. Currently it does not explicitly differentiate between the properties and class that are restricted to AIR only (other than the little icon when looking at the Class frame).