在本地数据库的LDAP用户数据缓存

编程入门 行业动态 更新时间:2024-10-27 16:26:42
本文介绍了在本地数据库的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用户数据缓存

本文发布于:2023-10-30 03:17:15,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1541609.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:缓存   数据库   数据   用户   LDAP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!