File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes BEA/Weblogic and the fly likes retieving the logged on user's password in weblogic10 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "retieving the logged on user Watch "retieving the logged on user New topic

retieving the logged on user's password in weblogic10

Rajesh Unnithan

Joined: Feb 20, 2009
Posts: 22

I have an application deployed in weblogic 10. I am using a ReadOnly SQL authenticator to authenticate the user against a database. All these process successfully completed. Now In my application I would like to get the logged in users credentials such as user name and password. I am able to retrieve the username using the web logic’s subjectUtil’s class. But I am not able to retrieve the password information. I tried it by calling the getprivateCredential() method of subject class. But its returning null. The following line of code explains what I did so far

//Retrieving the subject
Subject sub =;
//getting the principal from subject
//retrieving the user name from subject – Working fine

//getting the private credentials – Not working set is always returning null
Set privateCre = sub.getPrivateCredentials();
Iterator it1 = privateCre.iterator();
System.out.println("PRIVATE ******!!!";

Can anyone help me how to retrieve the password info?

Appreciate your help

I agree. Here's the link:
subject: retieving the logged on user's password in weblogic10
It's not a secret anymore!