wood burning stoves 2.0*
The moose likes Servlets and the fly likes Http Basic Authentication cached ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Http Basic Authentication cached ?" Watch "Http Basic Authentication cached ?" New topic
Author

Http Basic Authentication cached ?

Esteban Puertas
Greenhorn

Joined: Mar 23, 2008
Posts: 22
Hi!,
I have some question regarding the BASIC authentication method.
When configuring the application to use a BASIC authentication, the server returns some kind of token to the client ?
If the client makes some more calls to different resources that are under the same protected area, the application server has to make every time the authentication or there is some kind of cache managed by the application server ?
Is the browser the one that keeps the user and pwd cached and send it every time ?

Thanks a lot for any reply ;-)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41052
    
  43
Yes, the browser will keep sending the HTTP authentication header for all requests. That's actually something to keep in mind: the browser will continue to send the authentication headers, even after any server session associated with this user may have been invalidated.


Ping & DNS - my free Android networking tools app
Esteban Puertas
Greenhorn

Joined: Mar 23, 2008
Posts: 22
Thank you replying ;-)
And what about the server? it has to do the verification every time or there is a cache ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41052
    
  43
If the resource being accessed on the server is protected by an auth-constraint, then yes, the server will check that for each access. But it will see the auth header, and thus the check will succeed - should have no impact on your code (except for a negligible delay much too small to be noticed).
 
wood burning stoves
 
subject: Http Basic Authentication cached ?
 
Similar Threads
how to force user to login again when the session timed out
Is XSL document cached ??
authentication
Authentication
Authentication over ssl in jsp