CN108989332A - A kind of user authen method based on Redis - Google Patents

A kind of user authen method based on Redis Download PDF

Info

Publication number
CN108989332A
CN108989332A CN201810921563.2A CN201810921563A CN108989332A CN 108989332 A CN108989332 A CN 108989332A CN 201810921563 A CN201810921563 A CN 201810921563A CN 108989332 A CN108989332 A CN 108989332A
Authority
CN
China
Prior art keywords
redis
key
token
user
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810921563.2A
Other languages
Chinese (zh)
Inventor
何德球
陈铖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui Yun Cai Information Technology Co Ltd
Original Assignee
Anhui Yun Cai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Anhui Yun Cai Information Technology Co Ltd filed Critical Anhui Yun Cai Information Technology Co Ltd
Priority to CN201810921563.2A priority Critical patent/CN108989332A/en
Publication of CN108989332A publication Critical patent/CN108989332A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0807Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Abstract

The invention discloses a kind of user authen methods based on Redis, and the monitoring IP and port numbers of Redis are configured in the configuration item of Redis;It logins successfully rear system and generates token-key at random;System automatically saves user state information to Redis, stores using token-key as the key of Redis;Token-key is passed to web terminal to system or client saves;Web terminal or client send request data and transmit token-key as input flow content, and the present invention stores User Status using Redis, and token-key is transmitted as parameter;User Status switchs to Redis storage by the file storage of SESSION, and safety, stability, efficiency all significantly improve;Token-key solves the compatibility issue across client as parameter transmitting.

Description

A kind of user authen method based on Redis
Technical field
The present invention relates to field of communication technology more particularly to a kind of user authen methods based on Redis.
Background technique
The user authentication system of existing PHP system is mostly based on SESSION, and this mode passes through browser cookie Certification key is saved, automatic carrying cookie is requested to guarantee the transmitting of verification information by https, this method limitation is very Greatly, it is problematic in that in terms of safety, across client compatibility.
Summary of the invention
The object of the invention is to remedy the disadvantages of known techniques, provides a kind of user authen method based on Redis.
The present invention is achieved by the following technical solutions:
A kind of user authen method based on Redis, comprising the following steps:
(1) user downloads Redis source code packet by web and compiles Redis;
(2) the monitoring IP and port numbers of Redis are configured in the configuration item of Redis;
(3) user logs in PHP user authentication architecture system on web, logins successfully rear system and generates token-key at random;
(4) system automatically saves user state information to Redis, stores using token-key as the key of Redis;
(5) token-key is passed to web terminal by system or client saves;
(6) web terminal or client send request data and transmit token-key as input flow content;
(7) server-side receives the request data of web terminal or client, according to request data, builds with web terminal or client Vertical connection positions the information in Redis by token-key, takes out the logging state of user, and parse to information, complete At certification.
Further include there are following steps: after being parsed, being authenticated to information, letter also being authenticated to the history in Redis caching Breath is updated.
The invention has the advantages that the present invention stores User Status using Redis, token-key is transmitted as parameter;User State switchs to Redis storage by the file storage of SESSION, and safety, stability, efficiency all significantly improve;Token-key makees Solves the compatibility issue across client for parameter transmitting.
Detailed description of the invention
Fig. 1 is work flow diagram of the invention.
Specific embodiment
As shown in Figure 1, a kind of user authen method based on Redis, comprising the following steps:
(1) user downloads Redis source code packet by web and compiles Redis;
(3) the monitoring IP and port numbers of Redis are configured in the configuration item of Redis;
(3) user logs in PHP user authentication architecture system on web, logins successfully rear system and generates token-key at random;
(4) system automatically saves user state information to Redis, stores using token-key as the key of Redis;
(5) token-key is passed to web terminal by system or client saves;
(6) web terminal or client send request data and transmit token-key as input flow content;
(7) server-side receives the request data of web terminal or client, according to request data, builds with web terminal or client Vertical connection positions the information in Redis by token-key, takes out the logging state of user, and parse to information, complete At certification.
Further include there are following steps: after being parsed, being authenticated to information, letter also being authenticated to the history in Redis caching Breath is updated.

Claims (2)

1. a kind of user authen method based on Redis, it is characterised in that: the following steps are included:
(1) user downloads Redis source code packet by web and compiles Redis;
The monitoring IP and port numbers of Redis are configured in the configuration item of Redis;
(3) user logs in PHP user authentication architecture system on web, logins successfully rear system and generates token-key at random;
(4) system automatically saves user state information to Redis, stores using token-key as the key of Redis;
(5) token-key is passed to web terminal by system or client saves;
(6) web terminal or client send request data and transmit token-key as input flow content;
(7) server-side receives the request data of web terminal or client, according to request data, builds with web terminal or client Vertical connection positions the information in Redis by token-key, takes out the logging state of user, and parse to information, complete At certification.
2. a kind of user authen method based on Redis according to claim 1, it is characterised in that:
Further include having following steps: after being parsed, being authenticated to information, also to Redis caching in history authentication information into Row updates.
CN201810921563.2A 2018-08-14 2018-08-14 A kind of user authen method based on Redis Pending CN108989332A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810921563.2A CN108989332A (en) 2018-08-14 2018-08-14 A kind of user authen method based on Redis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810921563.2A CN108989332A (en) 2018-08-14 2018-08-14 A kind of user authen method based on Redis

Publications (1)

Publication Number Publication Date
CN108989332A true CN108989332A (en) 2018-12-11

Family

ID=64553057

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810921563.2A Pending CN108989332A (en) 2018-08-14 2018-08-14 A kind of user authen method based on Redis

Country Status (1)

Country Link
CN (1) CN108989332A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113282897A (en) * 2021-06-11 2021-08-20 杭州安恒信息安全技术有限公司 Multi-system account sharing method, device, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104283875A (en) * 2014-09-28 2015-01-14 深圳市中科无软件有限公司 Cloud disk authority management method
CN106302490A (en) * 2016-08-23 2017-01-04 浪潮电子信息产业股份有限公司 A kind of Web session structure based on Token and service calling method
CN107948167A (en) * 2017-11-29 2018-04-20 浙江数链科技有限公司 A kind of method and apparatus of single-sign-on
CN108040090A (en) * 2017-11-27 2018-05-15 上海上实龙创智慧能源科技股份有限公司 A kind of system combination method of more Web

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104283875A (en) * 2014-09-28 2015-01-14 深圳市中科无软件有限公司 Cloud disk authority management method
CN106302490A (en) * 2016-08-23 2017-01-04 浪潮电子信息产业股份有限公司 A kind of Web session structure based on Token and service calling method
CN108040090A (en) * 2017-11-27 2018-05-15 上海上实龙创智慧能源科技股份有限公司 A kind of system combination method of more Web
CN107948167A (en) * 2017-11-29 2018-04-20 浙江数链科技有限公司 A kind of method and apparatus of single-sign-on

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘派: "《基于Node.js的热计量监控预警系统的设计与实现》", 《中国硕士论文全文库》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113282897A (en) * 2021-06-11 2021-08-20 杭州安恒信息安全技术有限公司 Multi-system account sharing method, device, equipment and medium

Similar Documents

Publication Publication Date Title
US10862871B2 (en) Hardware-accelerated payload filtering in secure communication
CN105591819B (en) The method and device of Configuration network equipment
US9154485B1 (en) Authentication revalidation
CN107852411B (en) Efficient use of IPsec tunnels in a multipath environment
CN104702969B (en) Carry out method, system and the transcoding server of the passive transcoding of video/audio
US9172753B1 (en) Methods for optimizing HTTP header based authentication and devices thereof
WO2014074757A3 (en) Method & apparatus for improving the performance of tcp and other network protocols in a communications network
US20110321145A1 (en) Method for Ensuring Security of Computers Connected to a Network
WO2017031984A1 (en) Bmp message authentification method and device
JP2008186201A (en) Reverse proxy server, and control method and program thereof
CN108989332A (en) A kind of user authen method based on Redis
CN108894915B (en) Wind power generation remote monitoring system and working method thereof
CN102202071A (en) Microsoft service network (MSN)-based network video monitoring method and system
CN108200049A (en) A kind of method logged in based on character terminal short message certification
CN103281324A (en) Safety communication method for Android client side
CN104468493B (en) The method and system of web page are logged in network communication
CN110300105B (en) Remote key management method of network cipher machine
EP2506485A1 (en) Method and device for enhancing security of user security model
CN105516100B (en) Message parsing method and system based on BS structures
CN104917728A (en) Implementation method of cross-terminal single sign-on system
CN104539609B (en) A method of it solving illegitimate client and occupies server resource
CN110830431A (en) SQL Server database password hosting method
CN106534369B (en) Communication means and device
CN109347820A (en) It is a kind of to apply security defend method and system
CN113765893B (en) Protocol proxy password penetration authentication method applied to MySQL system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181211