首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Spring LDAP GSS-API

Spring LDAP GSS-API
EN

Stack Overflow用户
提问于 2017-03-30 10:06:03
回答 1查看 750关注 0票数 0

我正在尝试使用Spring LDAP连接到AD。我可以使用简单身份验证连接到服务器,但对于其中一个服务器,只有GSS-API身份验证是活动的。我无法使用Spring LDAP连接到此服务器。

有人能帮我解决这个问题吗?任何帮助都是非常感谢的!

下面是我的代码;

代码语言:javascript
复制
@Configuration
@Profile("prod")
public class AppProdConfig {

@Bean
public LdapContextSource ldapContextSource(){
    LdapContextSource ldapContextSource = new LdapContextSource();
    ldapContextSource.setUrls(new String[]{"ldaps://1.1.1.1:636","ldaps://2.2.2.2:636"});
    ldapContextSource.setBase("ou=users,ou=usersAndGroups,dc=ecommerce,dc=company");
    ldapContextSource.setUserDn("user");
    ldapContextSource.setPassword("password123");

    return ldapContextSource;
}

@Bean
public LdapTemplate ldapTemplate(LdapContextSource ldapContextSource){
    LdapTemplate ldapTemplate = new LdapTemplate(ldapContextSource);
    return ldapTemplate;
}
}
EN

回答 1

Stack Overflow用户

发布于 2018-02-04 07:58:06

Spring LDAP不支持这一点。My library将为您完成此操作。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43107254

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档