• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getRemoteUser and getUserPrincipal()

 
Andy Smith
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HttpServletRequest Contains two methods
1. getRemoteUser()
2. getUserPrinicipal().getName()
Both returns a String with usernam is there any difference between these names..
ans besides this is there any use of Principal object obtained through getUserPrincipal.
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually both of the methods return the same thing but since the Principal is an interface, it can deal with stuff like Security Certificate, Public Key and so on... Actually if the Principal interface is used as extended subclasses like Identity, KerberosPrincipal, X500Principal, it will be more useful...
Hope the above explanation helps you sthing... :roll:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic