Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Developer
Posts: 2
Registered: ‎01-26-2010
My Device: 9000

Retrieving User Login from Cache or BES Authentication

Hello all,

 

Just begun developing a blackberry web app with asp.net 2.0 and c# and looking for a lil help.

The page Im creating is a simple input form but within our intranet (we have a BES server).

Any time I want to view the intranet main website I get asked to authenticate with the username and password from my windows logon (the username however already recognised on my own blackberry). After that I don't have to enter details again for a few hours and remain logged in.

 

So what I'd like to know is how the blackberry knows who I am after authenticating (is the user info stored on the BES or the blackberry itself), and also is there a way to request this information from the input form from the asp or c# code (should only imagine it being a couple of lines of code)?

 

Hopefully theres something that can retrieve the details from the cache or a request line of code to get the user details.

 

Thanks if you can help,

Mark 

Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Retrieving User Login from Cache or BES Authentication

Greetings, thanks for your post.

 

The Mobile Data Service (MDS) component of your BlackBerry Enterprise Server supports a variety of authentication schemes. In the situation where authentication is required, MDS will cache user credentials after a user is prompted for a username and password. The next time that user logs into the server and is challenged for a username and password, MDS will automatically authenticate the user with the cached credentials, removing the need for them to re-enter their credentials each time.

 

Please see the following Developer newsletter article for more information: Understanding MDS: Developer's perspective

 

Sincerely,

Adam

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
New Developer
Posts: 2
Registered: ‎01-26-2010
My Device: 9000

Re: Retrieving User Login from Cache or BES Authentication

Ah ok, understand a bit more now, so now that it I know that the login/authentication credentials are cached, how can the elements of them be called via code?

 

i.e. How can I gain access to either the authentication cookie or the cache data to retreive the persons username?

 

It looks like this data can be "Pushed" to the Blackberry browser so just need to know how to setup this "push" request.

Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Retrieving User Login from Cache or BES Authentication

Hi mbeckford,

 

The browser application itself does not retain the authorization UID/PWD values.  It passes them to MDS on the initial request which then manages this information .  MDS includes the "Authorization" HTTP header in outgoing web requests (when necessary) which is received and processed by the target web server.  This header is used only to authenticate a user agent (browser or an application) with a server, and is removed by the web server before the request is sent to your web application (for security reasons).

 

For more information on the HTTP Authorization header, please see section 14.8 of RFC2616 (HTTP 1.1 standard): http://www.faqs.org/rfcs/rfc2616.html

 

The BlackBerry browser can receive web content pushed to its cache.  The intention of this is to provide users with the web content locally in advance of them making an HTTP request (improves page load performance).  This developer guide describes Push in great detail.

 

Please let me know if this information is helpful.

 

Sincerely,

Adam

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.