标签: ldap-client

使用Laravel4进行LDAP身份验证

请帮我使用Laravel4进行LDAP身份验证.

我的配置总是返回false

我有这样的auth.php:

<?php

return array(

/*
|--------------------------------------------------------------------------
| Default Authentication Driver
|--------------------------------------------------------------------------
|
| This option controls the authentication driver that will be utilized.
| This driver manages the retrieval and authentication of the users
| attempting to get access to protected areas of your application.
|
| Supported: "database", "eloquent"
|
*/

//'driver' => 'eloquent',
'driver' => 'ldap',

/*
|--------------------------------------------------------------------------
| Authentication Model
|--------------------------------------------------------------------------
|
| When using the "Eloquent" authentication driver, we need to know …
Run Code Online (Sandbox Code Playgroud)

php ldap laravel laravel-4 ldap-client

4
推荐指数
1
解决办法
4937
查看次数

Spring的LdapTemplate搜索:PartialResultException:未处理的Continuation Reference(s); 剩余名称'/'

我通过LDAP为特定应用程序添加用户,使用spring制作.

虽然这适用于大多数情况,但在某些情况下,它不起作用......

检索我使用的用户:

public class LdapUserServiceImpl implements ILdapUserService {

    @Override
    public List<LdapUserVO> getUserNamesByQuery(String query) {
        return ldapTemplate.search(
            query().countLimit(15)
                    .where("objectClass").is("user")
                    .and("sAMAccountName").isPresent()
                    .and(query()
                            .where("sAMAccountName").like("*" + query + "*")
                            .or("sAMAccountName").is(query)
                            .or("displayName").like("*" + query + "*")
                            .or("displayName").is(query))
            ,
            new AttributesMapper<LdapUserVO>() {
                public LdapUserVO mapFromAttributes(Attributes attrs) throws NamingException {
                    LdapUserVO ldapUser = new LdapUserVO();
                    Attribute attr = attrs.get(ldapUserSearch);
                    if (attr != null && attr.get() != null) {
                        ldapUser.setUserName(attr.get().toString());
                    }
                    attr = attrs.get("displayName");
                    if (attr != null && attr.get() != null) {
                        ldapUser.setDisplayName(attr.get().toString());
                    }
                    return ldapUser; …
Run Code Online (Sandbox Code Playgroud)

spring ldap ldap-query spring-ldap ldap-client

4
推荐指数
1
解决办法
7111
查看次数

标签 统计

ldap ×2

ldap-client ×2

laravel ×1

laravel-4 ×1

ldap-query ×1

php ×1

spring ×1

spring-ldap ×1