on 11-11-2005 9:06 AM
Hi,
I wanted to know how to get a reference to an IPrincipal if I have the reference to IUser interface.
Basically I have IResourceContext.
IResourceContext m_context;
I can get IUser from it like
m_context.getUser();
But I have to get IPricipal for JCA (Connector Framework to invoke an ABAP rfc).
I'm unable to figure it out, Kindly help me.
Thanks and regards
Radha Krishna .B
HI,
are you talking about com.sap.security.api.IUser?
If so, this interface already extends com.sap.security.api.IPrincipal
Did you just try to use the m_context.getUser() as parameter for the JCA?
I do not know much about JCA. Maybe JCA needs another interface IPrincipal? Can you check the complete package name of IPrincipal needed by JCA?
Kind regards,
Ralf
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
com.sapportals.portal.security.usermanagement.IUser is an user instance of the old usermanagement API used by KM.
If you call the method "public com.sap.security.api.IUser getUMEUser()" on that "old" IUser, you will get a "new" IUser (IUser of the new usermanagement API.
The new IUser already implements the IPrincipal interface (see my previous post).
I hope this solves your problem.
Kind regards,
Ralf
Hi, Radhakrishna,
you can use the IUserFactory.getUMEUser method. First,
get the user factory with the following code:
import com.sapportals.portal.prt.runtime.PortalRuntime;
import com.sapportals.portal.prt.service.usermanagement.IUserManagementService;
import com.sapportals.portal.security.usermanagement.IUserFactory;
IUserFactory fac = (IUserManagementService) PortalRuntime.
getRuntimeResources().
getService(IUserManagementService.KEY);
Then get the corresponding UME user with:
fac.getUMEUser(yourUserObject)
Now you have an object that can be used as an IPrincipal because
com.sap.security.api.IUser is a subinterface of com.sap.security.api.IPrincipal.
Hope this helps, and don't hesitate to ask if anything remains unclear.
Heiko
Hi, Radhakrishna,
yes, they are deprecated but they are still used by the KMC APIs until NW 2006. So, basically, ignore the "deprecated" messages. As soon as the new User Management Engine (UME) is supported by the APIs you can (but need not right away, as the old calls will be supported for some time) migrate to the new principal objects.
Cheers,
Heiko
Hi, Radhakrishna,
it depends. If you are already working on KMC 7.1 they are available otherwise not. In general, as soon as you are working on NW 2006 KMC they are available (which in turn depends on your development strategies).
The new methods look exactly the same as the old ones except that if these took user management objects such as users as arguments they then take the new UME objects, that's about it.
Regards,
Heiko
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.