CN108924156A - A kind of method, apparatus and storage medium that session duration is set - Google Patents

A kind of method, apparatus and storage medium that session duration is set Download PDF

Info

Publication number
CN108924156A
CN108924156A CN201810826808.3A CN201810826808A CN108924156A CN 108924156 A CN108924156 A CN 108924156A CN 201810826808 A CN201810826808 A CN 201810826808A CN 108924156 A CN108924156 A CN 108924156A
Authority
CN
China
Prior art keywords
session
user
duration
session duration
request
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
CN201810826808.3A
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201810826808.3A priority Critical patent/CN108924156A/en
Publication of CN108924156A publication Critical patent/CN108924156A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1069Session establishment or de-establishment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • 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/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a kind of method, apparatus and storage medium that session duration is arranged, and can be realized that user is customized to be modified website session duration.The method includes:It is arranged according to the session duration of the user received and is requested, configures the session duration of the user;When receiving the session request of the user, according to the session duration of the configuration, the session duration of the session request of the user is changed.Using the embodiment of the present invention, it may be implemented to allow the customized change session duration of user, allow user oneself to control session duration, do not need to dispose preceding configuration, only need default settings, the duration modification that only needs to conversate in setting of the individual needs of user is saved and be can be completed.

Description

A kind of method, apparatus and storage medium that session duration is set
Technical field
The present invention relates to computer technology technology, espespecially a kind of method, apparatus and storage medium that session duration is set.
Background technique
In the prior art, cloud platform system limits demand to the duration of session towards many corporate users, different companies It is different.Current solution is to be directed to the configuration setting for the duration that conversates when different user is disposed.This scheme Shift to an earlier date when not only needing to dispose and client confirms session demand, when also facing the demand change of later period user, needs to change and match It sets, service of restarting etc. is not only complicated for operation, but also is unable to satisfy the diversified needs of user.
Summary of the invention
In order to solve the above-mentioned technical problems, the present invention provides a kind of method, apparatus that session duration is arranged and storage to be situated between Matter, can be realized that user is customized to be modified website session duration.
In order to reach the object of the invention, the present invention provides it is a kind of be arranged session duration method, the method includes:
It is arranged according to the session duration of the user received and is requested, configures the session duration of the user;
When receiving the session request of the user, according to the session duration of the configuration, the meeting of the user is changed Talk about the session duration of request.
Further, the time letter for the session duration that the session duration setting request needs to be arranged comprising the user Breath.
Further, request is arranged in the session duration for the user that the basis receives, and configures the session duration of the user, Further include before:
It verifies user's input account and whether password is correct, verification result is correctly just to allow the user configuration meeting Talk about duration.
Further, request is arranged in the session duration for the user that the basis receives, and configures the session duration of the user, Including:
Request is arranged in the session duration that node service by introducing express-session frame receives the user, Configure the session duration of the user.
Further, described when receiving the session request of the user, according to the session duration of the configuration, change The session duration of the session request of the user, including:
When receiving the session request of the user, the node by introducing express-session frame is serviced, and is blocked The session request is cut, and according to the session duration of the configuration, changes the session duration of the session request of the user.
In order to reach the object of the invention, the present invention also provides a kind of device that session duration is arranged, described device includes Configuration module and change module, wherein:
The configuration module configures the session of the user for the session duration setting request according to the user received Duration;
The change module, for when receiving the session request of the user, according to the session duration of the configuration, Change the session duration of the session request of the user.
Further, the configuration module is arranged according to the session duration of the user received and requests, and configures the user's Session duration further includes before:
Configuration module verifies user's input account and whether password is correct, and verification result is correctly just to allow the use Family configuration session duration.
Further, the configuration module is arranged according to the session duration of the user received and requests, and configures the user's Session duration, including:
When the configuration module receives the session of the user by introducing the node service of express-session frame Long setting request, configures the session duration of the user.
Further, the change module is when receiving the session request of the user, according to the session of the configuration Duration changes the session duration of the session request of the user, including:
The change module is when receiving the session request of the user, by introducing express-session frame Node service, intercept the session request, and according to the session duration of the configuration, change the session request of the user Session duration.
In order to reach the object of the invention, the present invention also provides a kind of computer readable storage mediums, are stored thereon with meter Calculation machine program, when which is executed by processor the step of the realization above method.
Compared with prior art, the present invention includes the session duration setting request according to the user received, configures the use The session duration at family;When receiving the session request of the user, according to the session duration of the configuration, the user is changed Session request session duration.The present invention may be implemented to allow the customized change session duration of user, and user oneself is allowed to control meeting Duration is talked about, does not need to dispose preceding configuration, it is only necessary to which default settings, the individual needs of user only need to conversate in setting Duration modification, which saves, can be completed.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification It obtains it is clear that understand through the implementation of the invention.The objectives and other advantages of the invention can be by specification, right Specifically noted structure is achieved and obtained in claim and attached drawing.
Detailed description of the invention
Attached drawing is used to provide to further understand technical solution of the present invention, and constitutes part of specification, with this The embodiment of application technical solution for explaining the present invention together, does not constitute the limitation to technical solution of the present invention.
Fig. 1 is the flow chart of the method for the setting session duration of the embodiment of the present invention one;
Fig. 2 is the structural schematic diagram of the device of the setting session duration of the embodiment of the present invention three.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention Embodiment be described in detail.It should be noted that in the absence of conflict, in the embodiment and embodiment in the application Feature can mutual any combination.
Step shown in the flowchart of the accompanying drawings can be in a computer system such as a set of computer executable instructions It executes.Also, although logical order is shown in flow charts, and it in some cases, can be to be different from herein suitable Sequence executes shown or described step.
Embodiment one
A kind of method that session duration is set is present embodiments provided, as shown in Figure 1, this method includes S11-S12:
S11, the session duration setting request according to the user received, configure the session duration of user;
S12, when receiving the session request of user, according to the session duration of configuration, change the session request of user Session duration.
In the embodiment of the present invention, user can voluntarily configuration session duration, can be realized that user is customized to be modified net Duration is talked about in standing-meeting.
In the present embodiment, the temporal information for the session duration that session duration setting request needs to be arranged comprising user.
Optionally, the above method further includes:It is arranged according to the session duration of the user received and is requested, configures the session of user It before duration, verifies user's input account and whether password is correct, verification result is correct just permission user configuration session duration.
In one alternate embodiment, it is arranged according to the session duration of the user received and is requested, when configures the session of user It is long, including:
Request, configuration is arranged in the session duration that node service by introducing express-session frame receives user The session duration of user.
In one alternate embodiment, when receiving the session request of user, according to the session duration of configuration, change is used The session duration of the session request at family, including:
When receiving the session request of user, the node by introducing express-session frame is serviced, and intercepts meeting Words request, and according to the session duration of configuration, change the session duration of the session request of user.
According to the setting request of the session duration of the user received in the embodiment of the present invention, when configuring the session of the user It is long;When receiving the session request of the user, according to the session duration of the configuration, the session request of the user is changed Session duration.The present invention may be implemented to allow the customized change session duration of user, allows user oneself to control session duration, is not required to Dispose preceding configuration, it is only necessary to default settings, the individual needs of user only need to conversate in setting duration modification protect Depositing can be completed.
Embodiment two
Above-described embodiment method is specifically described in the present embodiment, and present invention is mainly applied to the sessions of cloud platform website Duration control, may be implemented the customized website session duration of user.
The present invention includes that front end (on website) conversates the customized setting of duration;Node service carries out realizing customized meeting Duration control is talked about, background data base (such as mysql) saves customized session duration.
Node service conversation configuration in default situations backstage is as follows:
In this example, the session duration maxAge of node service default setting is 60 minutes, i.e., after user logs in, after sixty minutes It is automatic expired, it can not continue to access.
It is requested when the session duration of the user received is arranged, configures the session duration of the user, including:
(1) when receiving user for oneself demand and conversating on website the maintenance modification request of duration, it is The customized session duration of user be saved in the databases such as backstage mysql by system;
(2) user inputs account and password logs in, and verifies user's input account and whether password is correct, verifying As a result just allow the user configuration session duration to be correct;
(3) after background service verifying logs in successfully, according to the customized duration of the user received, by introducing express- The session duration of user described in the node service configuration of session frame, executes following code:
The customized duration of request.session.cookie.maxAge=user;
Request.session._garbage=Date.now ();
req.session.touch();
After executing above-mentioned code, the session duration of this user will be reset, and update the expired time of this session.
When receiving the session request of the user, according to the session duration of the configuration, the meeting of the user is changed The session duration of request is talked about, including:
(1) all session requests after user logs in are intercepted;
(2) by introducing the node service of express-session frame, the session of the session request of the user is changed Duration, more new session expired time, execute following code:
app.use(“/”,function(req,res,next){
Req.session._garbage=Date.now ();
req.session.touch();
The method provided through this embodiment, realizes that user is customized to be modified website session duration.The present invention makes It obtains and disposes session duration without being customized when cloud platform system is disposed, without because some demands of later period client become Change configuration of modifying, service of restarting etc. reduces maintenance cost, improves the experience of user, so that session setting function is more Add flexibly it is easy-to-use, meet the diversified session demand of different user.
Embodiment three
A kind of device that session duration is set is present embodiments provided, description is also applied for this reality in above method embodiment It applying in example, shown in Fig. 2, which includes configuration module 21 and changes module 22, wherein:
Configuration module 21 configures the session duration of user for the session duration setting request according to the user received;
Module 22 is changed, for according to the session duration of configuration, changing user's when receiving the session request of user The session duration of session request.
In one alternate embodiment, configuration module 21 is arranged according to the session duration of the user received and requests, and configuration is used The session duration at family further includes before:
Configuration module 21 verifies user's input account and whether password is correct, and verification result is correctly just to allow user configuration Session duration.
In one alternate embodiment, configuration module 21 is arranged according to the session duration of the user received and requests, and configuration is used The session duration at family, including:
Configuration module 21 receives the session duration setting of user by introducing the node service of express-session frame Request, configures the session duration of user.
In one alternate embodiment, change module 22 is when receiving the session request of user, according to the session of configuration Duration changes the session duration of the session request of user, including:
Module 22 is changed when receiving the session request of user, by the node for introducing express-session frame Service intercepts session request, and according to the session duration of configuration, changes the session duration of the session request of user.
The embodiment of the present invention also provides a kind of computer storage medium, and the computer storage medium is stored with computer journey Sequence;After the computer program is performed, the setting session duration method of previous embodiment offer can be realized, for example, executing Method as shown in Figure 1.
Although disclosed herein embodiment it is as above, the content only for ease of understanding the present invention and use Embodiment is not intended to limit the invention.Technical staff in any fields of the present invention is taken off not departing from the present invention Under the premise of the spirit and scope of dew, any modification and variation, but the present invention can be carried out in the form and details of implementation Scope of patent protection, still should be subject to the scope of the claims as defined in the appended claims.

Claims (10)

1. a kind of method that session duration is arranged, which is characterized in that the method includes:
It is arranged according to the session duration of the user received and is requested, configures the session duration of the user;
When receiving the session request of the user, according to the session duration of the configuration, the session for changing the user is asked The session duration asked.
2. the method according to claim 1, wherein session duration setting request is needed comprising the user The temporal information of the session duration of setting.
3. the method according to claim 1, wherein the session duration setting for the user that the basis receives is asked It asks, configures the session duration of the user, further include before:
It verifies user's input account and whether password is correct, verification result is when correctly just allowing the user configuration session It is long.
4. the method according to claim 1, wherein the session duration setting for the user that the basis receives is asked It asks, configures the session duration of the user, including:
Request, configuration is arranged in the session duration that node service by introducing express-session frame receives the user The session duration of the user.
5. the method according to claim 1, wherein described when receiving the session request of the user, root According to the session duration of the configuration, the session duration of the session request of the user is changed, including:
When receiving the session request of the user, the node by introducing express-session frame is serviced, and intercepts institute Session request is stated, and according to the session duration of the configuration, changes the session duration of the session request of the user.
6. a kind of device that session duration is arranged, which is characterized in that described device includes configuration module and changes module, wherein:
The configuration module configures the session duration of the user for the session duration setting request according to the user received;
The change module, for according to the session duration of the configuration, changing when receiving the session request of the user The session duration of the session request of the user.
7. device according to claim 6, which is characterized in that the configuration module is according to the session duration of the user received Setting request, configures the session duration of the user, further includes before:
Configuration module verifies user's input account and whether password is correct, and verification result is correctly the user just to be allowed to match Set session duration.
8. device according to claim 6, which is characterized in that the configuration module is according to the session duration of the user received Setting request, configures the session duration of the user, including:
The session duration that the configuration module receives the user by introducing the node service of express-session frame is set Request is set, the session duration of the user is configured.
9. device according to claim 6, which is characterized in that the change module is asked when the session for receiving the user When asking, according to the session duration of the configuration, the session duration of the session request of the user is changed, including:
The change module is when receiving the session request of the user, by introducing express-session frame Node service, intercepts the session request, and according to the session duration of the configuration, change the meeting of the session request of the user Talk about duration.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor The step of any one of claim 1-5 the method is realized when execution.
CN201810826808.3A 2018-07-25 2018-07-25 A kind of method, apparatus and storage medium that session duration is set Pending CN108924156A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810826808.3A CN108924156A (en) 2018-07-25 2018-07-25 A kind of method, apparatus and storage medium that session duration is set

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810826808.3A CN108924156A (en) 2018-07-25 2018-07-25 A kind of method, apparatus and storage medium that session duration is set

Publications (1)

Publication Number Publication Date
CN108924156A true CN108924156A (en) 2018-11-30

Family

ID=64418197

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810826808.3A Pending CN108924156A (en) 2018-07-25 2018-07-25 A kind of method, apparatus and storage medium that session duration is set

Country Status (1)

Country Link
CN (1) CN108924156A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170331850A1 (en) * 2016-05-12 2017-11-16 Synopsys, Inc. Systems and methods for analyzing software using queries
CN108289079A (en) * 2017-01-09 2018-07-17 大唐移动通信设备有限公司 A kind of method and device of session refreshing duration control

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170331850A1 (en) * 2016-05-12 2017-11-16 Synopsys, Inc. Systems and methods for analyzing software using queries
CN108289079A (en) * 2017-01-09 2018-07-17 大唐移动通信设备有限公司 A kind of method and device of session refreshing duration control

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JAXU: "Node.js刷新session过期时间", 《HTTPS://WWW.CNBLOGS.COM/JAXU/P/5180814.HTML》 *
艾新觉罗: "express之cookie和session", 《HTTPS://WWW.CNBLOGS.COM/AICANXXX/P/7158192.HTML》 *

Similar Documents

Publication Publication Date Title
US20230336536A1 (en) Single sign-on enabled with oauth token
US11924214B2 (en) Systems and methods for accessing cloud resources from a local development environment
US11245682B2 (en) Adaptive authorization using access token
US10257205B2 (en) Techniques for authentication level step-down
AU2013217048B2 (en) Mobile human challenge-response test
US10887311B2 (en) Method and apparatus for requesting usage permission, and method and apparatus for acquiring usage permission
US20170118167A1 (en) Whitelist construction
EP2633422B1 (en) Unified policy over heterogenous device types
US20190332790A1 (en) Impersonation for a federated user
US20210286872A1 (en) Dynamically Generating Activity Prompts to Build and Refine Machine Learning Authentication Models
US11283793B2 (en) Securing user sessions
US20100071056A1 (en) Method and system for multi-protocol single logout
CN104077521B (en) Information processing method and device
WO2014177115A1 (en) Mobile terminal application batch management method and system, and upgrade server
CN102546642B (en) The method of Telnet and device
US11750590B2 (en) Single sign-on (SSO) user techniques using client side encryption and decryption
CN114124490B (en) Method and device for publishing new media content, storage medium and electronic equipment
CN110365684A (en) Access control method, device and the electronic equipment of application cluster
US10263971B2 (en) Preventing unauthorized access to secured information systems by injecting device data collectors
CN111163045B (en) Transparent mechanism for local combination of personal-related distributed stored user data
CN104092737B (en) Location-based service middleware method based on cloud
EP2668580A1 (en) A system and method for accessing a service
CN109948332A (en) A kind of physical machine login password remapping method and device
CN108924156A (en) A kind of method, apparatus and storage medium that session duration is set
CN108683675B (en) Report activating method based on SSO extending sessions duration

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: 20181130