我需要从第三方应用程序进行oim用户身份验证。我正在寻找相同的OIM API。
答案 0 :(得分:3)
在OIM中,身份验证被卸载到应用程序服务器(即WebLogic),因此您必须添加一个身份验证提供程序,该身份验证提供程序知道如何连接到您希望OIM用于身份验证的应用程序。
https://blogs.oracle.com/ArdaEralp/entry/configure_oim_ad_ldap_authentication https://docs.oracle.com/cd/E28280_01/web.1111/e13718/atn.htm#DEVSP220
上述链接将提供有关如何为OIM配置新的Autentication提供程序以及身份验证提供程序实际含义及其内部的视图。
答案 1 :(得分:1)
public static final String OIM_HOSTNAME = "oim.hpt.lab";
public static final String OIM_PORT = "14000";
public static final String OIM_PROVIDER_URL = "t3://"+ OIM_HOSTNAME + ":" + OIM_PORT;
public static final String OIM_USERNAME = "tungpt";
public static final String OIM_PASSWORD = "Hpt123456";
public static final String OIM_CLIENT_HOME = "F:/designconsole11gr3/config";
public static final String AUTHWL_PATH = OIM_CLIENT_HOME + "/authwl.conf";
public static void main(String[] args) {
// TODO Auto-generated method stub
OIMClient oimClient = null;
try {
//Set system properties required for OIMClient
System.setProperty("java.security.auth.login.config", AUTHWL_PATH);
System.setProperty("APPSERVER_TYPE", "wls");
// Create an instance of OIMClient with OIM environment information
Hashtable env = new Hashtable();
env.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL, "weblogic.jndi.WLInitialContextFactory");
env.put(OIMClient.JAVA_NAMING_PROVIDER_URL, OIM_PROVIDER_URL);
oimClient = new OIMClient(env);
// Login to OIM with the approriate credentials
System.out.println("Login by: "+ OIM_USERNAME);
oimClient.login(OIM_USERNAME, OIM_PASSWORD.toCharArray());
System.out.println("Login Done!");
}catch(Exception e){
e.printStackTrace();
}
}