• Post Reply Bookmark Topic Watch Topic
  • New Topic

request.getUserPrincipal() return null after authentication  RSS feed

Vaibhav Tomorrow
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,
How can I associate a subject with Websphere Context.
I am not able to get the user Principal after authentication.
For authentication I have created a subject :
HashSet principals = new HashSet();
HashSet privateCredentials = new HashSet();
HashSet publicCredentials = new HashSet();
principals.add(new UserPrincipal("Vaibhav"));
Subject subject = new Subject(false, principals,publicCredentials, privateCredentials);

LoginContext loginContext = new LoginContext("Userpass",subject);
Using this I am able to perform authentication , but when I tried to get the user Principal in jsp it always return null.
can any body help me what do I need to do to get the user principal.
[ July 05, 2008: Message edited by: Vaibhav Vaibhav ]
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!