关闭

Limit the attempted login times

231人阅读 评论(0) 收藏 举报
分类:
redis-cli
127.0.0.1:6379> set user_info;;user_id;;login_times 0
#when attempt to login
127.0.0.1:6379> incrby user_info;;user_Id;;login_times 1
st=>start: Start
e=>end: End
op1=>operation: Input username/password
op2=>operation: Attempt Login
cond1=>condition: user_info;;user_Id;;login_times > 3 ?
op3=>operation: Lock account
cond2=>condition: username/password correct ?
op4=>operation: Login Success
op5=>operation: incrby user_info;;user_Id;;login_times 1
op6=>operation: set user_info;;user_Id;;login_times 0
cond3=>condition: Account Lock ?

st->op1->op2->cond3->cond1->e
cond1(yes)->op3->e
cond1(no)->cond2
cond2(yes)->op4->op6->e
cond2(no)->op5->op1
cond3(no)->cond1
cond3(yes)->e
Created with Raphaël 2.1.0StartInput username/passwordAttempt LoginAccount Lock ?Enduser_info;;user_Id;;login_times > 3 ?Lock accountusername/password correct ?Login Successset user_info;;user_Id;;login_times 0incrby user_info;;user_Id;;login_times 1yesnoyesnoyesno
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:219128次
    • 积分:3122
    • 等级:
    • 排名:第11079名
    • 原创:99篇
    • 转载:12篇
    • 译文:0篇
    • 评论:53条
    最新评论