我在我的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用户数据缓存
发布评论