1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | package com.massiveGaze.ldap; import java.io.FileInputStream; import java.util.Hashtable; import java.util.Properties; import javax.naming.Context; import javax.naming.directory.DirContext; import javax.naming.directory.InitialDirContext; public class LDAPConnection { static String oidUrl,oidUserName,oidPassword,userContainer; private static final String TEST_PROPERTIES_FILE = "data/ldapsync.properties"; static{ System.out.println("Connection Started "); try{ Properties eventProps = new Properties(); eventProps.load(new FileInputStream(TEST_PROPERTIES_FILE)); oidUrl = eventProps.getProperty("LDAP.OID.URL"); oidUserName = eventProps.getProperty("LDAP.OID.Username"); oidPassword = eventProps.getProperty("LDAP.OID.Password"); userContainer = eventProps.getProperty("LDAP.UserContainer"); System.out.println("oidUrl- > "+oidUrl); System.out.println("oidUserName- > "+oidUserName); System.out.println("userContainer- > "+userContainer); }catch(Exception e){ System.out.println("Connection Failed With Exception "); e.printStackTrace(); } } public static DirContext getLDAPConnection() throws Exception { Hashtable<String,String> attrs = new Hashtable<String,String>(); attrs.put(Context.PROVIDER_URL, oidUrl); attrs.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory"); attrs.put(Context.SECURITY_PRINCIPAL, oidUserName); attrs.put(Context.SECURITY_CREDENTIALS, oidPassword); DirContext context = new InitialDirContext(attrs); return context; } public static String getUserContainer(){ return userContainer; } } |
Oracle Identity Manager (OIM R2PS2/PS3/12C) is a highly flexible and scalable enterprise identity administration system that provides operational and business efficiency by providing centralized administration & complete automation of identity and user provisioning events across enterprise as well as extranet applications.
OIM LDAP OID/OUD/OVD Connection API
Subscribe to:
Posts (Atom)
About OIM
Oracle Identity Management enables organizations to effectively manage the end - to - end life - cycle of user ide...
Popular Posts
-
OIM API's Sample Code : Videos: Massive Gaze Videos Connection Related API's : OIM DB Connection/ Data Source connection ...
-
Videos: Massive Gaze Videos 1. Basic OIM Information 2. MDS Export/Import 3. Steps For R2PS2 / R2PS3 Custom Pre-processor Ev...
-
Videos: Massive Gaze Videos 1. Query to get OIM Provsioned/provisioning Account details 2. Query to get usr keys For Rejected / ...
No comments:
Post a Comment