概述
vue-isyourpasswordsafe (vue-isyourpasswordsafe)
Troy Hunt has repeatedly made a wonderful job keeping up with good security measures regarding personal data, more specificaly making the site Have I Been Pwned. On his latest blog post he explains a new technique to search through the database of leaked passwords in a smart and fast way giving developers a tool to ensure that a user is not signing up their projects with compromised passwords.
特洛伊·亨特(Troy Hunt)反复出色地完成了有关个人数据的良好安全措施,更具体地说,使网站“我被拥有了”。 在他最新的博客文章中,他解释了一种新技术,该技术可以快速,智能地搜索泄漏的密码数据库,从而为开发人员提供了一种工具,以确保用户不会使用受到破坏的密码来注册其项目。
Developers should start making sure that their users don't use compromised passwords, and by dropping this component on your form you can take the first step into achieving that.
开发人员应开始确保其用户不会使用泄露的密码,并且通过将此组件放在表单上,您可以迈出第一步。
安装 (Installation)
yarn add vue-isyourpasswordsafe
# or
npm i vue-isyourpasswordsafe
用法 (Usage)
All you need to do is initialize the component and specify the min and max length of password you want to enable. If these requirements are not met, the package won't validate the password.
您需要做的就是初始化组件,并指定要启用的密码的最小和最大长度。 如果不满足这些要求,则软件包将不会验证密码。
import VueIsYourPasswordSafe from 'vue-isyourpasswordsafe'
Vue.use(VueIsYourPasswordSafe, {
minLength: 8,
maxLength: 64
});
Make sure to check the example, but once loaded you can use our own component like this:
确保检查示例 ,但是一旦加载,您可以使用我们自己的组件,如下所示:
<vue-isyourpasswordsafe v-model="myStrongPassword" @onFinishedChecking="isPasswordSafe"/>
If you are using another package to manage UI or don't want to use our own component, you can always manually check for a password with the Vue.prototype method:
如果您要使用其他软件包来管理UI或不想使用我们自己的组件,则始终可以使用Vue.prototype方法手动检查密码:
const isSafe = await this.$isPasswordSafe(this.myStrongPassword);
使用Vue-IsYourPasswordSafe的著名站点/项目 (Notable sites/projects using Vue-IsYourPasswordSafe)
lolisafe - Blazing fast file uploader and awesome bunker written in node! ????
lolisafe-用节点编写的快速文件上传器和超棒的掩体! ????
Feel free to add yours here!
随时在这里添加您的!
贡献 (Contributing)
Fork it
叉它
Create your feature branch:
git checkout -b my-new-feature
创建功能分支:
git checkout -b my-new-feature
Commit your changes:
git commit -am 'Add some feature'
提交更改:
git commit -am 'Add some feature'
Push to the branch:
git push origin my-new-feature
推送到分支:
git push origin my-new-feature
Submit a pull request
提交拉取请求
翻译自: https://vuejsexamples.com/checks-if-the-given-password-has-been-leaked-against-the-have-i-been-pwned-api/
最后
以上就是温婉猎豹为你收集整理的检查给定的密码是否已经泄露给我是否拥有API的全部内容,希望文章能够帮你解决检查给定的密码是否已经泄露给我是否拥有API所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复