本文整理汇总了Java中org.jasig.cas.util.LdapTestUtils.createLdapEntries方法的典型用法代码示例。如果您正苦于以下问题:Java LdapTestUtils.createLdapEntries方法的具体用法?Java LdapTestUtils.createLdapEntries怎么用?Java LdapTestUtils.createLdapEntries使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jasig.cas.util.LdapTestUtils
的用法示例。
在下文中一共展示了LdapTestUtils.createLdapEntries方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import org.jasig.cas.util.LdapTestUtils; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
// Environment check
this.enableLdapTests = System.getProperty("enableLdapTests") != null;
Assume.assumeTrue("enableLdapTests system property not set", this.enableLdapTests);
this.context = new ClassPathXmlApplicationContext(this.contextPaths);
this.baseDn = this.context.getBean("baseDn", String.class);
this.usersLdif = this.context.getBean("usersLdif", Resource.class);
this.usernameAttribute = this.context.getBean("usernameAttribute", String.class);
this.provisioningConnectionFactory = this.context.getBean(
"provisioningConnectionFactory", ConnectionFactory.class);
this.testEntries = LdapTestUtils.readLdif(this.usersLdif, this.baseDn);
final Connection connection = getConnection();
try {
connection.open();
LdapTestUtils.createLdapEntries(connection, this.directoryType, this.testEntries);
} finally {
LdapUtils.closeConnection(connection);
}
}
示例2: setUp
import org.jasig.cas.util.LdapTestUtils; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
super.setUp();
this.groupsLdif = context.getBean("groupsLdif", Resource.class);
this.groupEntries = LdapTestUtils.readLdif(this.groupsLdif, this.baseDn);
final Connection connection = getConnection();
try {
connection.open();
LdapTestUtils.createLdapEntries(connection, this.directoryType, this.groupEntries);
} finally {
connection.close();
}
this.userDetailsService = this.context.getBean(LdapUserDetailsService.class);
}
示例3: populateEntries
import org.jasig.cas.util.LdapTestUtils; //导入方法依赖的package包/类
protected void populateEntries(final LDAPConnection c, final InputStream rs) throws Exception {
this.ldapEntries = LdapTestUtils.readLdif(rs, getBaseDn());
LdapTestUtils.createLdapEntries(c, ldapEntries);
populateEntriesInternal(c);
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:6,代码来源:InMemoryTestLdapDirectoryServer.java