on 03-24-2008 5:18 PM
Hi Gurus,
i have a webdynpro application where in the webdynpro view the user enters the portal logon and password in the input field and after submittng the data ,i have to validate the password entered is right against the portal logon.How to do it ?Do we have any method to check the password entered against portal.
Thanks.
Aravind
I don't know if there is a way to check the password like you specify, but you can force the user to login through the standard portal security (even if running the Web Dynpro outside of the EP) before they run your application. This way if they have the wrong password, they can't get in at all.
Putting this code in your wdDoInit() will display a portal login screen anytme someone accesses your application, unless they are already logged in:
IWDClientUser user1 = WDClientUser.forceLoggedInClientUser();
Hope I understood your question correctly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tom,
Thanks for your inputs .This would not help my scenario,as i need to take the user password input from within my webdynpro application ie, after i run the webdynpro application and then user enters a password in the input field and have to validate against portal for the password entered.This is similar to the inital portal login but from the running webdynpro application
Hi,
Try this:
IUserAccount usrAccount = UMFactory.getUserAccountFactory().getUserAccountByLogonId("<logonID>",null);
if(usrAccount != null && !usrAccount.isPasswordDisabled()){
if(usrAccount.checkPassword("<input string>"))
//match
else
//wrong password
}
You will need to have a DC dependency on tc/security/api for this to work.
Regards,
Satyajit.
IWDClientUser user=null;
try
{
user = WDClientUser.getCurrentUser();
}
catch(Exception e){ }
IUser name = user.getSAPUser();
String User_Id = name.getUniqueName();
String Mail_Id =name.getEmail();
Simillarly you try to get password and then, validate.To use this code you need to include this library to your project,
com.sap.security.api.jar
Edited by: Rajesh A on Mar 25, 2008 1:24 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.