• Post Reply Bookmark Topic Watch Topic
  • New Topic

http authentication  RSS feed

 
Markus A Kramer
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I'm trying to protect one of my servlets via HTTP basic authentiication.
of course, this is possible through the server.
but, is there are way a servlet can access the username and password the visitor entered?
thank's,
Markus
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the getUserPrincipal, getRemoteUser methods on HttpServletRequest interface. From these you cannot get the password though.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!