java - How to get user details from Websphere UserRegistry -


how fetch user's other details ad after logging application using ldap registry configured in websphere server. have java ee application, using single sign on. want other details email, office location of user configured in active directory. how that?

        // retrieves default initialcontext server.         javax.naming.initialcontext ctx = new javax.naming.initialcontext();          // retrieves local userregistry object.         com.ibm.websphere.security.userregistry reg = (com.ibm.websphere.security.userregistry) ctx                 .lookup("userregistry"); 

from registry, there chance it?

in websphere application server can access user registry information -and modify it- thorugh virtual member manager componente api.

there's plenty of documentation , samples on ibm infocenter. there, code snippet properties of entity user:

dataobject root = sdohelper.createrootdataobject(); dataobject entity = sdohelper.createentitydataobject(root, null, do_person_account); entity.createdataobject(do_identifier).set(prop_unique_name,                               "uid=salesmanager,cn=users,dc=yourco,dc=com"); dataobject propctrl = sdohelper.createcontroldataobject(root, null, do_property_control);            propctrl.getlist(prop_properties).add("sn"); propctrl.getlist(prop_properties).add("uid"); propctrl.getlist(prop_properties).add("cn"); propctrl.getlist(prop_properties).add("telephonenumber"); propctrl.getlist(prop_properties).add("createtimestamp");  root = service.get(root); 

to service instance communicates registry need first execute programming prerequisites of api. stringly suggest review infocenter documentation.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -