The invention discloses an account security verification method based on websocket, which includes the following steps: login flow, 1A, verifying user's username and password correctly and login successfully, the browser sends websocket connection request, then the server sends a response, establishes websocket link between browser and server; 1B, records user's login information into a queue; After starting the thread, modify the user's current login status according to the data in the queue; exit the process, 2A, disconnect the websocket link when the user exits; 2B, record the user's login disconnection information into the message queue; 2C, after starting the thread, modify the user's current login status according to the data in the queue. The invention can improve the shortcomings of the existing technology and solve the problem of uniqueness of account login more stably and safely.
【技术实现步骤摘要】
一种基于websocket的账户安全验证方法
本专利技术涉及工业控制网络
,尤其是一种基于websocket的账户安全验证方法。
技术介绍
随着信息技术的发展,工业控制系统逐步实现联网化,越来越多的工业控制协议运行于工业以太网上,实现工业网络通讯,同时,针对工业网络的攻击也越来越多和更加普遍,为了解决并发问题带来的安全问题,以及安全问题所以限制登录用户的唯一性是很有必要的。在工控网络中,记录操作人员的操作日志、提高日志记录的准确型,为了防止账号复用等隐患发生,减少不安全的并发隐患,就需要保证登录用户的唯一性,提高到安全高度。如:防止账号复用,导致管理混乱,造成安全隐患。目前,针对限制登录的用户的唯一性主要办法是通过拦截器来识别,使用拦截器来解决用户只允许在一处地方登陆其他地方登陆踢掉。这种方法占用服务器的内存而且,无法及时对已经退出用户进行处理,产生垃圾数据,导致无法登录或重复提示错误信息,而且只能踢出其他用户,不适用于工业控制系统。
技术实现思路
本专利技术要解决的技术问题是提供一种基于websocket的账户安全验证方法,能够解决现有技术的不足,可以更加稳定 ...
【技术保护点】
1.一种基于websocket的账户安全验证方法,其特征在于包括以下步骤:登录流程,1A、校验用户的用户名和密码正确并登录成功后,浏览器发出websocket连线请求,然后服务器发出回应,在浏览器和服务器之间建立websocket链接;1B、将用户的登录信息记录到一个队列中;1C、启动线程后,根据队列中的数据修改用户的当前登录状态;退出流程,2A、当用户退出时,断开websocket链接;2B、将用户的登录断开信息记录到消息队列中;2C、启动线程后,根据队列中的数据修改用户的当前登录状态。
【技术特征摘要】
1.一种基于websocket的账户安全验证方法,其特征在于包括以下步骤:登录流程,1A、校验用户的用户名和密码正确并登录成功后,浏览器发出websocket连线请求,然后服务器发出回应,在浏览器和服务器之间建立websocket链接;1B、将用户的登录信息记录到一个队列中;1C、启动线程后,根据队列中的数据修改用户的当前登录状态;退出流程,2A、当用户退出时,断开webso...
【专利技术属性】
技术研发人员:王小东,李佳鑫,
申请(专利权)人:北京天地和兴科技有限公司,
类型:发明
国别省市:北京,11
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。