本文整理汇总了Java中com.unboundid.ldap.sdk.SimpleBindRequest类的典型用法代码示例。如果您正苦于以下问题:Java SimpleBindRequest类的具体用法?Java SimpleBindRequest怎么用?Java SimpleBindRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SimpleBindRequest类属于com.unboundid.ldap.sdk包,在下文中一共展示了SimpleBindRequest类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initializeFromJson
import com.unboundid.ldap.sdk.SimpleBindRequest; //导入依赖的package包/类
@Override
public void initializeFromJson(JsonNode node) {
if(node == null){
LOGGER.warn("Attempted to initizlize an LDAP datasource from a null JsonNode.");
return;
}
databaseName = parseJsonNode(node, LDAP_CONFIG_DATABASE, true).asText();
//TODO Add functionality for other BindRequest Types
BindRequest bindRequest = new SimpleBindRequest(
parseJsonNode(node, LDAP_CONFIG_BINDABLE_DB, true).asText(),
parseJsonNode(node, LDAP_CONFIG_PASSWORD, true).asText());
int initialConnections = parseInitialConnections(node);
int maxConnections = parseMaxConnections(node);
Map<String, Integer> hostPortMap = parseServers(node);
String[] hosts = hostPortMap.keySet().toArray(new String[0]);
ServerSet serverSet;
if(hostPortMap.size() == 1){
serverSet = new SingleServerSet(hosts[0], hostPortMap.get(hosts[0]));
}
else{
int[] ports = new int[hosts.length];
for(int x = 0; x < ports.length; x++){
ports[x] = hostPortMap.get(hosts[x]);
}
//TODO Add support for other ServerSet types.
serverSet = new RoundRobinServerSet(hosts, ports);
}
try{
connectionPool = new LDAPConnectionPool(serverSet, bindRequest, initialConnections, maxConnections);
}
catch(LDAPException e) {
throw new LdapConfigException("Unable to connect to ldap server(s).", e);
}
}
开发者ID:lightblue-platform,项目名称:lightblue-ldap,代码行数:42,代码来源:LdapDataSourceConfiguration.java
示例2: LDAPUtil
import com.unboundid.ldap.sdk.SimpleBindRequest; //导入依赖的package包/类
/**
* @param ldapServer
*/
public LDAPUtil(LDAPServer ldapServer) {
super();
if (ldapServer != null) {
url = ldapServer.getUrl();
port = ldapServer.getPort();
if (StringUtils.isNotEmpty(ldapServer.getBindUsername())
&& StringUtils.isNotEmpty(ldapServer.getBindPassword())) {
bindRequest = new SimpleBindRequest(ldapServer.getBindUsername(), ldapServer.getBindPassword());
}
} else {
url = DEFAULT_URL;
port = DEFAULT_PORT;
}
}
开发者ID:slimsymphony,项目名称:testgrid,代码行数:18,代码来源:LDAPUtil.java
示例3: bindAsTechnicalUser
import com.unboundid.ldap.sdk.SimpleBindRequest; //导入依赖的package包/类
private void bindAsTechnicalUser() throws LDAPException {
ldapConnection.bind(new SimpleBindRequest("cn=" + ldapLookupUser + "," + ldapLookupBaseDN, ldapLookupPassword));
}
开发者ID:sinnerschrader,项目名称:SkillWill,代码行数:4,代码来源:LdapService.java
示例4: createBindRequest
import com.unboundid.ldap.sdk.SimpleBindRequest; //导入依赖的package包/类
@Override
@NotNull
public BindRequest createBindRequest() {
return new SimpleBindRequest(bindDn, password);
}
开发者ID:bozaro,项目名称:git-as-svn,代码行数:6,代码来源:LdapBindDn.java
注:本文中的com.unboundid.ldap.sdk.SimpleBindRequest类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论