Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问如何在数据库中指定用户名或者密码? #461

Open
YBFJ opened this issue Oct 16, 2018 · 4 comments
Open

请问如何在数据库中指定用户名或者密码? #461

YBFJ opened this issue Oct 16, 2018 · 4 comments

Comments

@YBFJ
Copy link

YBFJ commented Oct 16, 2018

尊敬的博主,我想请问下,如果我的博客我只想指定一部分人去登录,就是指定大家都用一样的密码来登录,我应该怎么做呢?网站的安全性要求不高,只是一种数据统计网站

@wengang-dev
Copy link

尊敬的博主,我想请问下,如果我的博客我只想指定一部分人去登录,就是指定大家都用一样的密码来登录,我应该怎么做呢?网站的安全性要求不高,只是一种数据统计网站

密码验证的时候统一和一个密码进行匹配不就好了,至于这个统一的密码你如何告知给你的目标用户那就是现实生活中的事情了

@NoobAlitty
Copy link

尊敬的博主,我想请问下,如果我的博客我只想指定一部分人去登录,就是指定大家都用一样的密码来登录,我应该怎么做呢?网站的安全性要求不高,只是一种数据统计网站

  1. Set a shared password: Choose a password as the shared password and communicate it to the people you want to authorize. You can provide the password to them through email, private messages, or verbal communication.

  2. Add a simple login feature: Add a simple login feature to your blog website that only allows users to enter the password for authentication.

  3. Use session management: Once a user successfully enters the password to log in, you can create a session identifier in their browser using session management techniques (such as using a session library provided by a web framework). This way, the user doesn't need to enter the password again when accessing other restricted pages within the same browser.

  4. Restrict access: For restricted pages or features, you can check in your server-side code to ensure that access is allowed only when a session exists and the user has been authenticated (i.e., entered the correct password).

@qiusa
Copy link

qiusa commented Nov 26, 2023 via email

1 similar comment
@tianjy15
Copy link

tianjy15 commented Nov 26, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants