在本地数据库的LDAP用户数据缓存 [英] LDAP user data caching on local database

查看:1268
本文介绍了在本地数据库的LDAP用户数据缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的web应用程序的企业整合LDAP认证。我想向人们展示的姓名和电子邮件的上市。相反,查询LDAP服务器的名称,每次发邮件包含多个用户的列表中我想到了数据库在本地缓存中的数据。

I am integrating LDAP authentication in my web enterprise application. I would like to show listing of people name and email. Instead of querying the LDAP server for the name and email each time a listing containing several users I thought about caching the data locally in the database.

你们是否知道缓存LDAP数据的最佳做法?
我应该缓存LDAP用户数据?
我应该什么时候插入和刷新数据?

Do you guys know about caching LDAP data best practices? Should I cache LDAP user data? When should I insert and refresh the data?

推荐答案

与深化发展LDAP身份验证的Web应用程序,当我做同样的事情。

I did the same thing when developping web applications with LDAP authentication.

每个用户登录的时候,我找回了自己的LDAP uid和检查,如果它是在数据库中。如果没有,我从LDAP获取用户信息,你的情况:(?)的名字,姓氏和电子邮件。然后在数据库中的用户表中插入它

Each time a user logs in, I retrieve his LDAP uid and checks if it is in the database. If not, I get user information from LDAP, in your case : name, surname (?) and email. Then insert it in the user table of the database.

用户表模式应该是这样的:

The user table schema should look like this :

________________
| User         |
________________
| - id         |
| - ldap_uid   |
| - name       |
| - first_name |
| - mail       |

这篇关于在本地数据库的LDAP用户数据缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆