CN109040072A - A kind of method, system, server and the storage medium of client authorization log-on webpage - Google Patents

A kind of method, system, server and the storage medium of client authorization log-on webpage Download PDF

Info

Publication number
CN109040072A
CN109040072A CN201810886339.4A CN201810886339A CN109040072A CN 109040072 A CN109040072 A CN 109040072A CN 201810886339 A CN201810886339 A CN 201810886339A CN 109040072 A CN109040072 A CN 109040072A
Authority
CN
China
Prior art keywords
client
interface
server
request
authorization
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.)
Granted
Application number
CN201810886339.4A
Other languages
Chinese (zh)
Other versions
CN109040072B (en
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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810886339.4A priority Critical patent/CN109040072B/en
Publication of CN109040072A publication Critical patent/CN109040072A/en
Application granted granted Critical
Publication of CN109040072B publication Critical patent/CN109040072B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • H04L63/0815Network architectures or network communication protocols for network security for authentication of entities providing single-sign-on or federations
    • 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention relates to a kind of method at client authorization log-on webpage end, system, server and storage mediums, the present invention is the listening port for obtaining Http Server from PHP server by pc client, and create local Http server, the end Web obtains the listening port of Http server from PHP server, by being connected to the local Http server of pc client, authorization log-on message is obtained.

Description

A kind of method, system, server and the storage medium of client authorization log-on webpage
Technical field
Computer application technology of the present invention, and in particular to a kind of method of client authorization log-on webpage, system, clothes Business device and storage medium.
Background technique
In the prior art, when user logs in a certain website, it usually needs register login account and setting on the web site Corresponding login password.User can only log in the website A in the account number that the website A is registered, it is not possible to log in the website B, therefore, Yong Huruo It needs to log in multiple websites, then needs to register corresponding account, so that user needs to manage multiple account numbers, caused not to user Just.
If being logged in i.e. in many products of same company, if pc client has logged on, at this moment using authorization Other clients or page end of opening company can not have to input account number cipher again, directly log in.However in practical application In, user browses some in application, identity is logged in if necessary to have logged on successfully application using other, for current application Carry out authorization login, usually require that user executes multi-pass operation in the login page of the application and could complete to log in, interaction compared with It is complicated.
Summary of the invention
In view of this, the object of the present invention is to provide a kind of method of client authorization log-on webpage, system, server and Storage medium needs pc client, PHP server, the cooperation of the end Web to complete.
To achieve the goals above, the technical solution adopted by the present invention is a kind of method of client authorization log-on webpage, It the described method comprises the following steps:
S1, creation HttpServerPortRequest object, into PHP server, pc client sends message, and request obtains It takes in the port numbers for monitoring Http Server;
S2, creation HttpListener object, the object are obtained for creating Http server according in step S1 Port numbers, call listen interface provide interface access function until monitoring successfully, and for the end Web;
S3, the call back function for defining Http request, for calling the call back function automatically when the end Web initiates to request;
S4, the interface IP address requested according to call back function in step S3, the acquisition end Web, are connected by the interface IP address To the Http server of pc client, authorization log-on message is obtained.
In the above-mentioned technical solutions, the pc client requested to PHP server is one group of port numbers.
In the above-mentioned technical solutions, call back function defined in the step S3 is Service, the Service readjustment Function includes HttpRequest&request and HttpResponse&response, the HttpRequest&request table Show the parameter that the request of the end Web is sent, the HttpResponse&response indicates that Http server will be sent to the end Web Response message.
In the above-mentioned technical solutions, the GetPath interface of the HttpResponse&response object is called to obtain The interface IP address of the end Web request.
In the above-mentioned technical solutions, the interface IP address includes Pcclient/getUserInfo interface, returns to the end Web The head portrait and pet name data of current pc client login user provide the end Web and show the user information that authorization logs in;
The interface IP address further includes Pcclient/getCode interface, provides and generates the Auth code that authorization logs in, Then Auth code is placed in the domain name Cookie of current Http connection.
In the above-mentioned technical solutions, the Http server of pc client is connected in the step S4, and steps are as follows:
S41, creation AuthorizeCodeRequest object request Authcode to PHP server, and PHP server can return Return the Authcode logged according to the authorization that the data such as token, ip of pc client currently logged on user generate;
After S42, pc client receive the Authcode that authorization logs in, HttpCookie object is created, is then called The name that Cookie is arranged in SetName interface is pc_auth_code character string;Call SetValue interface setting Cookie's Value is the Auth code received;
S43, setCookie interface is called, HttpCookie object is arranged under the domain name of current Http connection In Cookie.
In the above-mentioned technical solutions, authorize the step of logging in as follows in the step S4:
After S431, pc client setting Cookie, the end Web is notified by the returned data of Pcclient/getCode interface The Authcode data of Cookie are arranged successfully, carry out authorization login;
S432, Web termination receive after pc client successfully notify, and the LoginNew interface of request PHP server is to PHP Authorization login function is completed in server request;
When S433, PHP server receive the LoginNew interface requests at the end Web, pc client setting is obtained Cookie data then takes out Authcode data and carries out data check, completes the end Web and authorizes login function.
Invention additionally discloses a kind of client authorization log-on webpage system, the system comprises creation module, monitor module, Definition module, login module;
The creation module, for creating HttpServerPortRequest object, the pc client into PHP server Message is sent, request monitors the port numbers of Http Server;
The monitoring module, for creating HttpListener object, the object is for creating Http server, and root It according to the port numbers obtained in creation module, calls listen interface until monitoring successfully, and provides interface access for the end Web Function;
The definition module, for defining the call back function of Http request, for being adjusted automatically when the end Web initiates to request With the call back function;
The authorization module, for obtaining the interface IP address of web terminal request, passing through according to call back function in definition module The interface IP address is connected to the Http server of pc client, obtains authorization log-on message.
Invention additionally discloses a kind of client authorization log-on webpage system, including memory, processor and it is stored in institute The computer program that can be run in memory and on the processor is stated, the processor executes real when the computer program A kind of the step of method of client authorization log-on webpage described in existing any of the above-described.
Invention additionally discloses a kind of computer readable storage medium, the computer-readable recording medium storage has computer Program realizes a kind of side of client authorization log-on webpage described in any of the above-described when the computer program is executed by processor The step of method.
The present invention a kind of method, system, server and the storage medium of client authorization log-on webpage, have beneficial below Effect: in the multiple product of same company, if pc client has logged on, if opening other page ends, user can not With input account number cipher, directly authorization logs in one-key operation and improves the Product Experience of user so that the operation is more convenient.
Detailed description of the invention
Fig. 1 is the flow chart for a kind of method that the embodiment of the present invention one provides client authorization log-on webpage;
Fig. 2 is that second embodiment of the present invention provides a kind of client authorization log-on webpage system module figures;
Fig. 3 is the structural schematic diagram for the server that the embodiment of the present invention three provides.
Specific embodiment
The present invention provides method, system, server and the storage medium of a kind of client authorization log-on webpage, pc client The listening port of one group of Http Server is obtained from PHP server, then creates local Http server, and the end Web takes from PHP Business device obtains the listening port of one group of Httpserver, is then attached to the local Http server of pc client, obtains authorization Log-on message.
In order to make the invention's purpose, features and advantages of the invention more obvious and easy to understand, below in conjunction with the present invention Attached drawing in embodiment, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that disclosed below Embodiment be only a part of the embodiment of the present invention, and not all embodiment.Based on the embodiments of the present invention, this field Those of ordinary skill's all other embodiment obtained without making creative work, belongs to protection of the present invention Range.
Present invention embodiment one as shown in Figure 1 provides a kind of method of client authorization log-on webpage, the method includes Following steps:
S1, creation HttpServerPortRequest object, into PHP server, pc client sends message, and request obtains It takes in the port numbers for monitoring Http Server;
Wherein, the pc client requested to PHP server is one group of port numbers, if pc client is fixed using one Port numbers are monitored, if this port numbers is occupied by other programs, be will lead to monitor failure, are caused the connection failure of the end Web.If to PHP server requests one group of port numbers, and pc client is successively monitored in one group of port numbers, until monitoring successfully.
The Http is the agreement of an object-oriented for belonging to application layer, due to its simple and direct, quick mode, is suitable for Distributed Hypermedia Information System when client is to server for services, need to only transmit requesting method and path.Requesting method is normal There are GET, HEAD, POST.It is different from the type of server contact that every kind of method defines client.Due to Http agreement letter It is single, so that the program small scale of Http server, thus communication speed is quickly, Http allows to transmit any type of data pair As.The Httpserver is a simple zero configuration order line Http server.
The main feature of Http agreement includes supporting Client/Server;When client is to server for services, only need Transmit requesting method and path;There are commonly GET, HEAD, POST for requesting method.Every kind of method defines client and server joins The type of system is different.Since Http agreement is simple, so that the program small scale of Http server, thus communication speed is quickly; Http allows to transmit any type of data object.The type transmitted is marked by Content-Type;Connectionless It is meant that limitation connection only one request of processing every time.The request of the complete client of server process, and after receiving the response of client, i.e., It disconnects.Transmission time can be saved in this way.Http agreement is stateless protocol.Statelessly refer to agreement for Issued transaction does not have memory capability.Lacking state means that it must be retransmitted if subsequent processing needs the information of front, this The data volume that sample may cause connection transmission every time increases.On the other hand, its response when server does not need previous message It is just very fast.
The PHP is a kind of Embedded Script Language of cross-platform server end.It borrows C in large quantities, Java and The grammer of Perl language, and the characteristic of PHP oneself is coupled, so that WEB developer is rapidly write out dynamic and generates the page.It is propped up Hold most databases at present.The computer for providing (response) service: being referred to as server (Server) by server Web, It is server end.Client Web: the computer for receiving (request) service is referred to as client computer (Client), is also client.
The operation logic of PHP is exactly the cooperating process between Apache, PHP, browser:
When user inputs the PHP page file name to be accessed in browser address, then carriage return will trigger this PHP Request, and the WEB server (apache) that transmissionization will be requested to support PHP.
WEB server (apache) receives this request, and is judged to request if it is a PHP according to its suffix, WEB server (apache) takes out user's PHP application program to be accessed from hard disk or memory, and sends it to PHP and draw Hold up program.
PHP engine program will be scanned from the beginning to the end to the file that WEB server (apache) is sent and root It is read according to order from backstage, handles data, and be dynamically generated corresponding html page.
PHP engine returns to WEB server (apache) for html page is generated.WEB server (apache) again will Html page returns to client browser, the last one complete page is based on being presented in us at the moment by browser.
The Apache HTTP Server (abbreviation Apache) is an open source code of Apache Software Foundation Web page server can be run in most computers operating system, since its is multi-platform and safety is widely used, be One of most popular Web server end software.It is quick, reliable and can be extended by simple API, by Perl/Python Equal interpreters are compiled into server.Apache HTTP server is a modular server, is taken derived from NCSAhttpd Business device becomes the world and uses the web server software to rank the first by repeatedly modifying.
S2, creation HttpListener object, the object are obtained for creating Http server according in step S1 Port numbers, call listen interface provide interface access function until monitoring successfully, and for the end Web;
The HttpListener provides a Http agreement detectaphone that is simple, can controlling by programming mode.It is logical Some Http services can easily be provided by crossing it, without starting this kind of large-scale service routine of IIS.The end Web is electricity The webpage version at brain end.
S3, the call back function for defining Http request, for calling the call back function automatically when the end Web initiates to request;
Optionally, the call back function of the definition need to pass through the HttpListener object created in invocation step S2 RegisterService interface is registered.
The call back function is exactly the function called by function pointer.If you make the pointer (address) of function Another function is passed to for parameter, when the function pointed by this pointer is used to call it, here it is call back functions.It returns Letter of transfer number is not called directly by the realization side of the function, when specific event or condition occur by other side's tune , for being responded to the event or condition.Readjustment can be used for informing mechanism.Call back function is that application program is supplied to The function that Windows system DLL or other DLL is called is generally used for intercepting messages, obtains system information or the asynchronous thing of processing Part.Application program tells DLL the address pointer of call back function, and DLL can call the function in due course.Call back function The parameter format and transfer mode provided in advance is had to comply with, otherwise DLL mono- calls it that will cause collapsing for program or system It bursts.
Wherein, call back function defined in the step S3 is Service, and the Service call back function includes HttpRequest&request and HttpResponse&response, the HttpRequest&request indicate that the end Web asks The parameter of transmission is sought, the response that the HttpResponse&response expression Http server will be sent to the end Web disappears Breath.
The HTTP value that the HttpRequest enables ASP.NET reading client to send during Web request. The example of HttpRequest contains all data from client, these data can be regarded as input data, Handler and Module is equivalent to be treatment process, and HttpResponse is exactly to output.
In all input datas that HttpRequest includes, QueryString, the Form for thering are us to be commonly used, Cookie, it also allow we access some Http request, the relevant information of browser, request mapping associated documents path, Whether URL details, the method for request, request have been subjected to authentication, if for SSL etc..
HttpRequest is expansible hypertext transfer request.It for client provide client and server it Between transmit data function.It provides one and obtains the plain mode of data by URL, and will not make full page brush Newly.This makes webpage only update a part of page without bothering user.
HttpResponse is returned the result to client.And it is in need to client return operation will call HttpResponse.The function that it is provided concentrates on operation Http response section.
As soon as HttpRequest class is that a closing Http submits the type of information, and closes the type of Http output information It is HttpResponse class, the output of three types, i.e. text, URL, binary system may be implemented using HttpResponse class Stream.The output of the text, in daily exploitation, the text in backstage may need to be output in browser, and user is allowed to browse, This just needs to realize the output of dynamic HTML.The output of the URL, program development are frequently necessary to user's browsing according to circumstances It is redirected to other pages in interface.The binary stream, it is sometimes desirable to the file on server is supplied to user's downloading, or In one width picture of browser end dynamic generation.
S4, the interface IP address requested according to call back function in step S3, the acquisition end Web, are connected by the interface IP address To the Http server of pc client, authorization log-on message is obtained.
Optionally, the GetPath interface of the HttpResponse object is called to obtain the interface IP address of the end Web request;
The GetPath is path when returning to definition.
Optionally, the interface IP address includes Pcclient/getUserInfo interface, returns to the end Web current PC client The head portrait and pet name data for holding login user provide the end Web and show the user information that authorization logs in;
The interface IP address further includes Pcclient/getCode interface, provides and generates the Auth code that authorization logs in, Then Auth code is placed in the domain name Cookie of current Http connection.
The Authcode is authorization login password, and the Cookie is arranged by Http server, and browsing is stored in In device, but Http agreement is a kind of stateless protocol, and after data exchange, the link of server end and client will be closed It closes, exchanges data every time and require to establish new link, Cookie points are session cookie and lasting Cookie, session cookie Refer to the state in the life cycle expires for not setting it, before say, the unlatching of browser is exactly once meeting to closing Words, when closing browser, session cookie will tracking-browsing device and destroy.When closing a page, session is not influenced The destruction of Cookie.Lasting Cookie is then the life cycle Expires for setting it, is closed after browser, it will not sell It ruins, until the expired time of setting.For lasting Cookie, data can be transmitted in the same browser, for example, you are beating After opening Taobao's page login, you open a commodity page in point, are still logging state, even if you close browser, It is again turned on browser, can be still logging state.Here it is because Cookie transfers data to server end automatically, anti- It is fed back to the result come.
Wherein, the Http server of pc client is connected in the step S4, and steps are as follows:
S41, creation AuthorizeCodeRequest object request Authcode to PHP server, and PHP server can return Return the Authcode logged according to the authorization that the data such as token, ip of pc client currently logged on user generate;
Resource Server (Resource Server): it is responsible for the related letter such as user data resource of service provider Breath.When third-party application accesses this Resource Server, it is desirable to provide otherwise Access Token can prompt access to fail. Authorization Server (verifying authorization server): it is responsible for verifying user account name password, and is answered to third party WEB With granting Access Token.
After S42, pc client receive the Authcode that authorization logs in, HttpCookie object is created, is then called The name that Cookie is arranged in SetName interface is pc_auth_code character string;Call SetValue interface setting Cookie's Value is the Auth code received;
The Http cookies is divided to for two kinds of Session cookies and Persistent cookies.
Wherein, the Session cookies is that server is sent to the client one specific word of setting in response header The data (a variety of different fields have many hundreds kind) of section Set-Cookie, client is in request header response to server end one A Cookie data.Each client can all allow server-side to carry out recognition and tracking plus this Cookie in request and use later Family.The characteristics of Session cookies is not include expired time, and data only exist in memory.So session is closed It is lost with regard to permanent.This value and be a dynamic value, the value of one browser window Cookies of new opening may not Together.
The Persistent cookies data include an expired time, are stored on the hard disk of client.Once Expired, data can be removed from hard disk.Persistent cookies mainly includes some authentication informations (username and password) There are also the preferences of some individuals to be arranged.
S43, SetCookie interface is called, HttpCookie object is arranged under the domain name of current Http connection In Cookie.
Wherein, authorize the step of logging in as follows in the step S4:
After S431, pc client setting Cookie, the end Web is notified by the returned data of Pcclient/getCode interface The Authcode data of Cookie are arranged successfully, carry out authorization login;
S432, Web termination receive after pc client successfully notify, and the LoginNew interface of request PHP server is to PHP Authorization login function is completed in server request;
When S433, PHP server receive the LoginNew interface requests at the end Web, pc client setting is obtained Cookie data then takes out Authcode data and carries out data check, completes the end Web and authorizes login function.
Present invention embodiment two as shown in Figure 2 provides a kind of client authorization log-on webpage system, which is characterized in that described System includes creation module, monitors module, definition module, login module;
The creation module, for creating HttpServerPortRequest object, the pc client into PHP server Message is sent, request monitors the port numbers of Http Server;
The monitoring module, for creating HttpListener object, the object is for creating Http server, and root It according to the port numbers obtained in creation module, calls listen interface until monitoring successfully, and provides interface access for the end Web Function;
The definition module, for defining the call back function of Http request, for being adjusted automatically when the end Web initiates to request With the call back function;
The authorization module, for obtaining the interface IP address of web terminal request, passing through according to call back function in definition module The interface IP address is connected to the Http server of pc client, obtains authorization log-on message.
Present invention embodiment three as shown in Figure 3 provides a kind of server architecture signal of client authorization log-on webpage system Figure, the server of the embodiment include: processor 30, memory 31 and are stored in the memory 31 and can be described The computer program 32 run on processor 30.The processor 30 realizes above-mentioned each method when executing the computer program 32 Step in embodiment, the processor 30 realize each module in above-mentioned apparatus embodiment when executing the computer program 32 Function.
A kind of server of client authorization log-on webpage system can be desktop PC, notebook, palm Computer and cloud server etc. calculate equipment, and a kind of server of client authorization log-on webpage system may include, but not It is limited to, processor 30, memory 31.Fig. 3 is only the example to this server, does not constitute the restriction to this server, can To include perhaps combining certain components or different components, a kind of live streaming room than illustrating more or fewer components List drop-down obtains more rooms and realizes that the server of system can also include input-output equipment 33, display equipment 34 etc..
The processor 30 can be central processing unit, can also be other general processors, digital signal processor, Specific integrated circuit, ready-made programmable gate array or other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 31 can be a kind of storage inside list of the server of client authorization log-on webpage system Member, hard disk or memory.The memory 31 is also possible to the External memory equipment of the server, or the plug-in type being equipped with is hard Disk, intelligent memory card, safe digital card, flash card etc..
Further, the memory 31 can also both include the internal storage unit of the server or deposit including outside Store up equipment.The memory 31 is for storing other program sum numbers needed for the computer program and the electronic equipment According to.The memory 31 can be also used for temporarily storing the data that has exported or will export.
The input-output equipment 33 can be used for receiving the number or character information of input, specifically, input and output are set Standby 33 can also include but is not limited to one of keyboard, mouse, operating stick etc. and a variety of.
The display equipment 34 can be used for showing information input by user or be supplied to user information and terminal Various menus, display equipment 34 may include display panel, optionally, liquid crystal display can be used.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description Specific work process, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
Those of ordinary skill in the art may be aware that each embodiment described in conjunction with the examples disclosed in this document Module, method and step can be realized with the combination of electronic hardware or computer software and electronic hardware.Professional technique people Member can use different methods to achieve the described function each specific application, but this realization is it is not considered that super The scope of the present invention out.
If the integrated module is realized in the form of software function module and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-described embodiment side All or part of the process in method can also instruct relevant hardware to complete, the computer by computer program Program can be stored in a computer readable storage medium, and the computer program is when being executed by processor, it can be achieved that above-mentioned each The step of a embodiment of the method.Wherein, the computer program includes computer program code, and the computer program code can Think source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium can be with It include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disk, light that can carry the computer program code Disk, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the computer The content that readable medium includes can carry out increase and decrease appropriate according to the requirement made laws in jurisdiction with patent practice, such as It does not include electric carrier signal and telecommunication signal according to legislation and patent practice, computer-readable medium in certain jurisdictions.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although referring to before Stating embodiment, invention is explained in detail, those skilled in the art should understand that: it still can be to preceding Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these It modifies or replaces, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.

Claims (10)

1. a kind of method of client authorization log-on webpage, which is characterized in that the described method comprises the following steps:
S1, creation HttpServerPortRequest object, into PHP server, pc client sends message, and request is used In the port numbers for monitoring Http Server;
S2, creation HttpListener object, the object are used to create Http server, and according to the end obtained in step S1 Slogan calls listen interface to provide interface access function until monitoring successfully, and for the end Web;
S3, the call back function for defining Http request, for calling the call back function automatically when the end Web initiates to request;
S4, the interface IP address requested according to call back function in step S3, the acquisition end Web, are connected to PC by the interface IP address The Http server of client obtains authorization log-on message.
2. a kind of method of client authorization log-on webpage according to claim 1, which is characterized in that in the step S1, The pc client requested to PHP server is one group of port numbers.
3. a kind of method of client authorization log-on webpage according to claim 1, which is characterized in that fixed in the step S3 Justice call back function be Service, the Service call back function include HttpRequest&request and HttpResponse&response, the HttpRequest&request indicate the parameter that the request of the end Web is sent, described HttpR esponse&response indicates that Http server will be sent to the response message at the end Web.
4. a kind of method for stating client authorization log-on webpage according to claim 3, which is characterized in that described in calling The GetPath interface of HttpResponse&response object obtains the interface IP address of the end Web request.
5. a kind of method for stating client authorization log-on webpage according to claim 4, which is characterized in that the interface IP address includes Pcclient/getUserInfo interface returns to the head portrait and pet name data of the current pc client login user in the end Web, provides The end Web shows the user information that authorization logs in;
The interface IP address further includes Pcclient/getCode interface, provides and generates the Auth code that authorization logs in, then Auth code is placed in the domain name Cookie of current Http connection.
6. a kind of method of client authorization log-on webpage according to claim 5, which is characterized in that connect in the step S4 Being connected to the Http server of pc client, steps are as follows:
S41, creation AuthorizeCodeRequest object request Authcode to PHP server, and PHP server can return to root The Authcode that the authorization that the data such as token, ip according to pc client currently logged on user generate logs in;
After S42, pc client receive the Authcode that authorization logs in, HttpCookie object is created, SetName is then called The name that Cookie is arranged in interface is pc_auth_code character string;The value for calling SetValue interface setting Cookie is to receive The Auth code arrived;
S43, setCookie interface is called, HttpCookie object is arranged into the Cookie under the domain name of current Http connection In the middle.
7. a kind of method of client authorization log-on webpage according to claim 6, which is characterized in that awarded in the step S4 The step of power logs in is as follows:
After S431, pc client setting Cookie, the end Web is notified by the returned data of Pcclient/getCode interface The Authcode data of Cookie are arranged successfully, carry out authorization login;
S432, Web termination receive after pc client successfully notify, request the LoginNew interface of PHP server to PHP service Authorization login function is completed in device request;
When S433, PHP server receive the LoginNew interface requests at the end Web, the Cookie number of pc client setting is obtained According to, then take out Authcode data carry out data check, complete the end Web authorize login function.
8. a kind of client authorization log-on webpage system, which is characterized in that the system comprises creation module, monitor module, fixed Adopted module, login module;
The creation module, for creating HttpServerPortRequest object, into PHP server, pc client is sent Message, request monitor the port numbers of Http Server;
The monitoring module, for creating HttpListener object, the object is used to create Http server, and according to wound The port numbers obtained in modeling block, call listen interface until monitoring successfully, and provide interface for the end Web and access function Energy;
The definition module, for defining the call back function of Http request, for calling institute automatically when the end Web initiates to request State call back function;
The authorization module, for the interface IP address of web terminal request being obtained, by described according to call back function in definition module Interface IP address is connected to the Http server of pc client, obtains authorization log-on message.
9. a kind of client authorization log-on webpage system, including memory, processor and storage are in the memory and can The computer program run on the processor, which is characterized in that the processor is realized when executing the computer program As described in any one of claims 1 to 7 the step of a kind of method of client authorization log-on webpage.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In realizing that a kind of client authorization as described in any one of claims 1 to 7 is stepped on when the computer program is executed by processor The step of recording the method for webpage.
CN201810886339.4A 2018-08-06 2018-08-06 Method, system, server and storage medium for client to authorize login of webpage Active CN109040072B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810886339.4A CN109040072B (en) 2018-08-06 2018-08-06 Method, system, server and storage medium for client to authorize login of webpage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810886339.4A CN109040072B (en) 2018-08-06 2018-08-06 Method, system, server and storage medium for client to authorize login of webpage

Publications (2)

Publication Number Publication Date
CN109040072A true CN109040072A (en) 2018-12-18
CN109040072B CN109040072B (en) 2021-03-12

Family

ID=64648976

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810886339.4A Active CN109040072B (en) 2018-08-06 2018-08-06 Method, system, server and storage medium for client to authorize login of webpage

Country Status (1)

Country Link
CN (1) CN109040072B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111464594A (en) * 2020-03-13 2020-07-28 平安国际智慧城市科技股份有限公司 Http interface connection method, apparatus and storage medium
CN111552488A (en) * 2019-02-11 2020-08-18 福建省天奕网络科技有限公司 Method and storage medium for H5 cross-engine client data automation updating
CN111782997A (en) * 2020-06-04 2020-10-16 小米数字科技有限公司 Method and device for loading webpage and storage medium
CN112380506A (en) * 2020-11-11 2021-02-19 随锐科技集团股份有限公司 Method, system, storage medium and electronic device for automatically logging in browser

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101043522A (en) * 2006-03-22 2007-09-26 腾讯科技(深圳)有限公司 Web server based communication method and system
US20100138534A1 (en) * 2008-11-25 2010-06-03 Rishi Mutnuru Systems and methods for monitor an access gateway
US20100199099A1 (en) * 2009-02-05 2010-08-05 Junling Wu User friendly Authentication and Login Method Using Multiple X509 Digital Certificates
US20110154464A1 (en) * 2009-12-23 2011-06-23 Puneet Agarwal Systems and methods for intercepting and automatically filling in forms by the appliance for single-sign on
CN103051630A (en) * 2012-12-21 2013-04-17 微梦创科网络科技(中国)有限公司 Method, device and system for implementing authorization of third-party application based on open platform
WO2013068719A1 (en) * 2011-11-10 2013-05-16 Gelliner Limited Online purchase processing system and method
CN104580406A (en) * 2014-12-23 2015-04-29 北京百度网讯科技有限公司 Method and device for synchronizing login status
CN105187406A (en) * 2015-08-14 2015-12-23 安徽新华博信息技术股份有限公司 Man in the middle monitoring system adopting configurable way for HTTPS (Hypertext Transfer Protocol over Secure Socket Layer)
CN106507158A (en) * 2015-09-06 2017-03-15 腾讯科技(北京)有限公司 A kind of information processing method, first terminal and second terminal
CN107729452A (en) * 2017-10-09 2018-02-23 武汉斗鱼网络科技有限公司 Webpage loading method, device, electronic equipment and computer-readable recording medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101043522A (en) * 2006-03-22 2007-09-26 腾讯科技(深圳)有限公司 Web server based communication method and system
US20100138534A1 (en) * 2008-11-25 2010-06-03 Rishi Mutnuru Systems and methods for monitor an access gateway
US20100199099A1 (en) * 2009-02-05 2010-08-05 Junling Wu User friendly Authentication and Login Method Using Multiple X509 Digital Certificates
US20110154464A1 (en) * 2009-12-23 2011-06-23 Puneet Agarwal Systems and methods for intercepting and automatically filling in forms by the appliance for single-sign on
WO2013068719A1 (en) * 2011-11-10 2013-05-16 Gelliner Limited Online purchase processing system and method
CN103051630A (en) * 2012-12-21 2013-04-17 微梦创科网络科技(中国)有限公司 Method, device and system for implementing authorization of third-party application based on open platform
CN104580406A (en) * 2014-12-23 2015-04-29 北京百度网讯科技有限公司 Method and device for synchronizing login status
CN105187406A (en) * 2015-08-14 2015-12-23 安徽新华博信息技术股份有限公司 Man in the middle monitoring system adopting configurable way for HTTPS (Hypertext Transfer Protocol over Secure Socket Layer)
CN106507158A (en) * 2015-09-06 2017-03-15 腾讯科技(北京)有限公司 A kind of information processing method, first terminal and second terminal
CN107729452A (en) * 2017-10-09 2018-02-23 武汉斗鱼网络科技有限公司 Webpage loading method, device, electronic equipment and computer-readable recording medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HXKER: "微信第三方登录接口", 《HTTPS://BLOG.CSDN.NET/HXKER/ARTICLE/DETAILS/50260669》 *
刘雪飞,张光磊,王申强: "网络设备接口工作状态监控的实现", 《电脑知识与技术》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111552488A (en) * 2019-02-11 2020-08-18 福建省天奕网络科技有限公司 Method and storage medium for H5 cross-engine client data automation updating
CN111464594A (en) * 2020-03-13 2020-07-28 平安国际智慧城市科技股份有限公司 Http interface connection method, apparatus and storage medium
CN111782997A (en) * 2020-06-04 2020-10-16 小米数字科技有限公司 Method and device for loading webpage and storage medium
CN112380506A (en) * 2020-11-11 2021-02-19 随锐科技集团股份有限公司 Method, system, storage medium and electronic device for automatically logging in browser

Also Published As

Publication number Publication date
CN109040072B (en) 2021-03-12

Similar Documents

Publication Publication Date Title
US11936652B2 (en) Proxied multi-factor authentication using credential and authentication management in scalable data networks
US11546331B2 (en) Credential and authentication management in scalable data networks
US11805180B2 (en) Native activity tracking using credential and authentication management in scalable data networks
CN109040072A (en) A kind of method, system, server and the storage medium of client authorization log-on webpage
US9264435B2 (en) Apparatus and methods for access solutions to wireless and wired networks
US8073810B2 (en) Shared view of customers across business support systems (BSS) and a service delivery platform (SDP)
CN103634382B (en) A kind of system and method for realizing real-time, interactive on webpage
US6886046B2 (en) Methods and apparatus for extendible information aggregation and presentation
US20030061512A1 (en) Method and system for a single-sign-on mechanism within application service provider (ASP) aggregation
US20090327421A1 (en) Cross domain interaction of a Web application
CN107251528B (en) Method and apparatus for providing data originating within a service provider network
US20120239753A1 (en) Systems and methods for collaboration shared state management
EP1379045A1 (en) Arrangement and method for protecting end user data
US20130246504A1 (en) Method for subscribing to notification, apparatus and system
CN101299731A (en) Instant communication method and apparatus based on Web
US9971636B2 (en) Methods for implementing web services and devices thereof
CN104683313B (en) Multimedia service processing unit, method and system
CN108415710A (en) The method and system of API is issued, called in Intelligent dialogue development platform
CN106357609A (en) User creation method and system, public network server and private cloud equipment
US20210152508A1 (en) Enhancing Messages with Dynamic Content
CN107124430A (en) Pagejack monitoring method, device, system and storage medium
GB2375264A (en) Remote assembly of control messages
WO2022036833A1 (en) Cookie management method, intermediate node, and webvpn system
US20020198992A1 (en) Methods and apparatus for load balanced information aggregation and presentation
CN115484045A (en) Unified identity authentication method and system based on API gateway

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
GR01 Patent grant
GR01 Patent grant