File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 39548
    
  27
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 - updated with new look and Ping home screen widget
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: 39548
    
  27
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).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Http Basic Authentication cached ?
 
Similar Threads
Authentication over ssl in jsp
Is XSL document cached ??
authentication
Authentication
how to force user to login again when the session timed out