CN112671796B - Google Driver cloud service authentication acquisition method, device, equipment and storage medium - Google Patents
Google Driver cloud service authentication acquisition method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN112671796B CN112671796B CN202011632907.1A CN202011632907A CN112671796B CN 112671796 B CN112671796 B CN 112671796B CN 202011632907 A CN202011632907 A CN 202011632907A CN 112671796 B CN112671796 B CN 112671796B
- Authority
- CN
- China
- Prior art keywords
- cloud service
- data
- google driver
- driver cloud
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000012545 processing Methods 0.000 claims abstract description 86
- 238000013475 authorization Methods 0.000 claims abstract description 40
- 238000012546 transfer Methods 0.000 claims description 63
- 238000006243 chemical reaction Methods 0.000 claims description 19
- 238000004891 communication Methods 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims 2
- 238000010586 diagram Methods 0.000 description 7
- 230000007547 defect Effects 0.000 description 5
- 238000012795 verification Methods 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 3
- 238000000605 extraction Methods 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention relates to the field of cloud service access, and discloses a method, a device, equipment and a storage medium for authentication acquisition of Google Driver cloud service. The method comprises the following steps: receiving an input user name and a user password, acquiring a data access instruction, and encrypting the user name and the user password to obtain a data ciphertext; carrying out transcoding processing on the data ciphertext according to a preset transcoding algorithm to obtain an identity code; judging whether a login authorization request exists in the data access instruction; if the identity identification code and the cloud service operation instruction do not exist, sending the identity identification code and the cloud service operation instruction to a preset Google Driver cloud service server, and receiving an access authentication mark code returned by the Google Driver cloud service server; if the identity identification code exists, the identity identification code is sent to a preset Google Driver cloud service server, and a login mark code returned by the Google Driver cloud service server is acquired; and sending the login mark code and the cloud service operation instruction to a Google Driver cloud service server, and receiving an access authentication mark code returned by the Google Driver cloud service server.
Description
Technical Field
The invention relates to the field of cloud service access, in particular to a method, a device, equipment and a storage medium for authentication acquisition of Google Driver cloud service.
Background
The Google Driver is an online synchronous storage cloud service, and has a wide user group, and the user uploads documents, forms, photos, files and the like to the Google Driver under different devices or terminals so as to be convenient to access on other devices or terminals. In order to protect the security of data, the Google Driver needs to perform encryption security authentication, the user access is limited, and only transit access can be performed by installing a Google Driver client or a browser, so that the process of data transmission and synchronization of the user is complex and low in efficiency.
The Google Driver cloud service can be accessed through the embedded Google Driver API, but the form of API support provided by Google is very limited, and data accessible through the API is not comprehensive, so that the problems that the user data transmission and synchronization process is complex, the efficiency is low, the scene is limited, the accessible data is limited and the data is not comprehensive due to the fact that the Google Driver cloud service is accessed through a client or the API of the Google Driver cloud service must be solved, and a technology for reading the Google Driver cloud service more widely is required.
Disclosure of Invention
The invention mainly aims to solve the technical problems that the user data transmission and synchronization process is complex and the accessed data is limited because the Google Driver cloud service is accessed by a client or an API of the Google Driver cloud service.
The invention provides a method for acquiring authentication of Google Driver cloud service in a first aspect, which comprises the following steps:
receiving an input user name and a user password, acquiring a data access instruction, and encrypting the user name and the user password to obtain a data ciphertext, wherein the data access instruction comprises: a cloud service operation instruction;
transcoding the data ciphertext according to a preset transcoding algorithm to obtain an identity code;
judging whether a login authorization request exists in the data access instruction;
if the login authorization request does not exist, the identity identification code and the cloud service operation instruction are sent to a preset Google Driver cloud service server, and an access authentication mark code returned by the Google Driver cloud service server is received;
if the login authorization request exists, the identity identification code is sent to a preset Google Driver cloud service server, and a login mark code returned by the Google Driver cloud service server is acquired;
and sending the login mark code and the cloud service operation instruction to the Google Driver cloud service server, and receiving an access authentication mark code returned by the Google Driver cloud service server.
Optionally, in a first implementation manner of the first aspect of the present invention, the receiving an input user name and a user password, obtaining a data access instruction, and encrypting the user name and the user password to obtain a data ciphertext includes:
receiving an input user name and a user password, and integrally splicing the user name and the password to obtain first transfer data;
acquiring an encryption public key of the Google Driver cloud service;
performing algorithm conversion processing on the first transfer data based on an RSA encryption algorithm according to the encryption public key to obtain second transfer data;
and adding an identification character string with a preset number of bytes in the preamble of the second transit data to obtain a data ciphertext.
Optionally, in a second implementation manner of the first aspect of the present invention, the transcoding the data ciphertext according to a preset transcoding algorithm to obtain the identity identifier includes:
performing character conversion processing on the character string in the data ciphertext according to a preset BASE64 encryption conversion algorithm to obtain first processing data;
traversing the first processing data, and judging whether plus sign characters exist in the first processing data;
if yes, changing all plus characters in the first processing data into minus characters to obtain second processing data, and traversing the second processing data to judge whether the second processing data has forward and oblique stroke characters;
if the forward-slash characters exist, changing all the forward-slash characters in the second processing data into underline characters to obtain the identity codes; if no forward slash character exists, confirming the second processing data as the identity identification code;
if no plus sign character exists, traversing the first processing data, and judging whether the first processing data has a forward slash character or not;
if the forward-slash characters exist, changing all the forward-slash characters in the first processing data into underline characters to obtain an identity code;
and if the forward and oblique stroke characters do not exist, confirming the first processing data as the identity identification code.
Optionally, in a third implementation manner of the first aspect of the present invention, the determining whether a login authorization request exists in the data access instruction includes:
and detecting the character strings in the data access instruction according to a preset regular rule, and judging that the character strings have a character arrangement combination corresponding to the login authorization request.
Optionally, in a fourth implementation manner of the first aspect of the present invention, the sending the identity identifier and the cloud service operation instruction to a preset Google Driver cloud service server, and receiving an access authentication mark code returned by the Google Driver cloud service server includes:
constructing a hypertext transfer protocol request frame based on a communication protocol of the Google Driver cloud service, and filling the user name and the identity identification code as request parameters into the hypertext transfer protocol request frame to obtain a hypertext transfer protocol request;
sending the hypertext transfer protocol request to the Google Driver cloud service server;
and receiving processing data returned by the Google Driver cloud service server, extracting key value pairs from the processing data line by line, and finding an access authentication mark code based on matching Auth character strings of the key value pairs.
Optionally, in a fifth implementation manner of the first aspect of the present invention, the sending the identity identifier to a preset Google Driver cloud service server, and acquiring a login mark code returned by the Google Driver cloud service server includes:
constructing a hypertext transfer protocol request framework based on a communication protocol of the Google Driver cloud service, and filling the identity identification code and the cloud service operation instruction into the hypertext transfer protocol request framework to obtain a first hypertext transfer protocol request
Sending the first hypertext transfer protocol request to a Google Driver cloud service server;
and receiving first return data returned by the Google Driver cloud service server, extracting key value pairs of the first return data line by line, and matching to obtain a login mark code according to the key value pairs.
Optionally, in a sixth implementation manner of the first aspect of the present invention, the sending the login flag code and the cloud service operation instruction to the Google Driver cloud service server, and receiving an access authentication flag code returned by the Google Driver cloud service server includes:
filling the login mark code and the cloud service operation instruction into the hypertext transfer protocol request frame to obtain a second hypertext transfer protocol request;
sending the second hypertext transfer protocol request to the Google Driver cloud service server;
and receiving second return data returned by the Google Driver cloud service server, extracting key value pairs of the second return data line by line, and finding an access authentication mark code according to the matching of the key value pairs with an Auth character string.
The second aspect of the present invention provides an authentication acquisition apparatus for Google Driver cloud service, including:
the receiving module is used for receiving an input user name and a user password, acquiring a data access instruction, and encrypting the user name and the user password to obtain a data ciphertext, wherein the data access instruction comprises: a cloud service operation instruction;
the transcoding module is used for transcoding the data ciphertext according to a preset transcoding algorithm to obtain an identity code;
the judging module is used for judging whether a login authorization request exists in the data access instruction;
the first authentication acquisition module is used for sending the identity identification code and the cloud service operation instruction to a preset Google Driver cloud service server and receiving an access authentication mark code returned by the Google Driver cloud service server if a login authorization request does not exist;
the mark acquisition module is used for sending the identity identification code to a preset Google Driver cloud service server if a login authorization request exists, and acquiring a login mark code returned by the Google Driver cloud service server;
and the second authentication acquisition module is used for sending the login mark code and the cloud service operation instruction to the Google Driver cloud service server and receiving an access authentication mark code returned by the Google Driver cloud service server.
The third aspect of the present invention provides an authentication acquisition device for Google Driver cloud service, including: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line; the at least one processor calls the instructions in the memory to cause the authentication acquisition device of the Google Driver cloud service to execute the authentication acquisition method of the Google Driver cloud service.
A fourth aspect of the present invention provides a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to execute the above-described authentication acquisition method of the Google Driver cloud service.
Drawings
Fig. 1 is a schematic diagram of a first embodiment of an authentication acquisition method of a Google Driver cloud service in the embodiment of the present invention;
FIG. 2 is a diagram of a second embodiment of the authentication acquisition method of the Google Driver cloud service according to the embodiment of the present invention;
FIG. 3 is a schematic diagram of a third embodiment of the authentication acquisition method of the Google Driver cloud service according to the embodiment of the present invention;
fig. 4 is a schematic diagram of an embodiment of an authentication acquisition apparatus of the Google Driver cloud service according to the embodiment of the present invention;
fig. 5 is a schematic diagram of another embodiment of an authentication acquisition apparatus of the Google Driver cloud service according to the embodiment of the present invention;
fig. 6 is a schematic diagram of an embodiment of an authentication acquisition device of the Google Driver cloud service in the embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method, a device, equipment and a storage medium for obtaining Google Driver cloud service authentication.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, a specific flow of the embodiment of the present invention is described below, and referring to fig. 1, a first embodiment of the authentication acquisition method for Google Driver cloud service in the embodiment of the present invention includes:
101. receiving an input user name and a user password, acquiring a data access instruction, and encrypting the user name and the user password to obtain a data ciphertext, wherein the data access instruction comprises: a cloud service operation instruction;
in this embodiment, the data access instruction includes an operation instruction for the Google Driver cloud service and an authentication information identifier of the sending information terminal, where the authentication information identifier is used to determine whether a client sending a data source is a correct source. Receiving { IDuser: QWR, Password: wkkslm, and integrally splicing the QWERT and the wkkslm to obtain the QWERT wkkslm. Based on the RSA encryption algorithm, the RSA encryption algorithm comprises the following steps: in the first step, two unequal prime numbers p and q are randomly selected. In the second step, the product n of p and q is calculated. And a third step of calculating an euler function phi (n) of n, wherein phi (n) is (p-1) (q-1). In the fourth step, an integer e is randomly selected, provided that 1< e < φ (n), and e and φ (n) are relatively prime. And sixthly, encapsulating n and e into public keys, and encapsulating n and d into private keys. In practical application, the data of the public key and the private key are expressed in an ASN.1 format. And (3) encrypting the QWERT wkklms by using the public key (n, e) to obtain transit data. The additional header at the beginning of the transit data is a fixed five bytes, and the hexadecimal content is as follows: and the identification character strings of 0x00, 0x57, 0x1B, 0xE0 and 0xA4 are used to obtain the data ciphertext finally.
102. Carrying out transcoding processing on the data ciphertext according to a preset transcoding algorithm to obtain an identity code;
in this embodiment, the data ciphertext is also a character string, and the character string in the data ciphertext is subjected to character conversion processing based on the BASE64 encryption conversion algorithm to obtain intermediate processing data. And analyzing whether the intermediate processing data has "+", if so, replacing all "+" with "-", and obtaining second intermediate processing data after the replacement is completed. And judging whether a/symbol exists in the character string of the second intermediate processed data, if so, replacing all the/symbols with _.
103. Judging whether a login authorization request exists in the data access instruction;
in this embodiment, if the character string corresponding to the login authorization request is "DSD × … …%", it is determined whether the character string in the data access instruction has a characteristic character string of "DSD × … …%", and if so, it indicates that the login authorization request exists, and if not, it indicates that the login authorization request does not exist. In another embodiment, the data access instruction contains an instruction mark, the instruction mark is not limited to a numerical value and a character string, and when the instruction mark is obtained, whether the instruction mark is a preset login authorization request is judged based on a preset mapping relation. For example, there are three instructions A, B, C disclosed externally, only C needs login authorization, and the caller can determine whether the instruction is a login authorization request corresponding to the C instruction by only passing a value representing the instruction.
104. If the login authorization request does not exist, the identity identification code and the cloud service operation instruction are sent to a preset Google Driver cloud service server, and an access authentication mark code returned by the Google Driver cloud service server is received;
in this embodiment, a hypertext transfer protocol request framework is constructed based on a communication protocol of the Google Driver cloud service, and a user name and an identity identifier are filled in the hypertext transfer protocol request framework, where a protocol similar to { IDcode: (ii) a userID is described; fgfd6633. }, wherein the IDcode corresponds to the identity identification code and is accompanied by parameters: the cloud service management method includes the steps that app is com, android is gms, client _ sig is a client identifier, google _ play _ service _ version is version, has _ permission is 1, service is a service identifier, Email is an account number, and EncryptedPasswd is an encrypted identity identifier, and the user ID corresponds to a cloud service operation instruction, and data are filled into two gaps to obtain a data request file. And sending the data request file to a Google Driver cloud service server, and returning an authentication token by the server to finish the authentication of the Google Driver cloud service access.
105. If the login authorization request exists, the identity identification code is sent to a preset Google Driver cloud service server, and a login mark code returned by the Google Driver cloud service server is acquired;
in this embodiment, a hypertext transfer protocol request framework is constructed based on a communication protocol of Google Driver cloud service, and an identity code and a cloud service operation instruction are written into the hypertext transfer protocol request framework, where a framework protocol includes { IDCode: (ii) a Operationcode:; fgfd6633, wherein the IDcode corresponds to the identity identification code, the OperationCode corresponds to the cloud service operation instruction, namely the instruction identification, and the protocol request is generated. And sending the request to the Google Driver cloud service, and returning a login token, namely a login token, by the Google Driver cloud service.
106. And sending the login mark code and the cloud service operation instruction to a Google Driver cloud service server, and receiving an access authentication mark code returned by the Google Driver cloud service server.
In this embodiment, the login mark code and the cloud service operation instruction are filled into the hypertext transfer protocol request frame to obtain a second hypertext transfer protocol request, return data returned by the Google Driver cloud service server is received based on the login token and the instruction identifier, key value pairs are extracted from the return data line by line, and the access authentication mark code is found by matching the Auth character string according to the key value pairs.
In the embodiment of the invention, the user name and the user password are combined integrally, the identity is obtained through RSA algorithm encryption and BASE64 encryption conversion algorithm, and the verification token returned by the Google Driver cloud service server is obtained by sending the request to the Google Driver cloud service server. The method overcomes the defect that the Google Driver cloud service access must be realized by means of the client or the API, reduces the steps of data processing, and improves the efficiency and the application range of the cloud service access.
Referring to fig. 2, a second embodiment of the authentication acquisition method for Google Driver cloud service according to the embodiment of the present invention includes:
201. receiving an input user name and a user password, and integrally splicing the user name and the password to obtain first transit data;
in this embodiment, receiving a username: pqqeifns, testCode: | A SDSD # @ # #, and "pqeifns" and "! SDSD # @ # # "is integrally spliced to obtain" pqeifns! SDSD # @ # # "first transit data.
202. Acquiring an encryption public key of the Google Driver cloud service;
in this embodiment, the encryption public key of the Google Driver cloud service is externally published by the Google Driver cloud service API, and can be directly read by the access API. The public key is fixed, and can also be obtained internally, and no limitation is imposed here, and only the public key is obtained, and the public key can be accessed to the cloud service to be obtained, and internal data can also be read.
203. Performing algorithm conversion processing on the first transfer data based on an RSA encryption algorithm according to the encryption public key to obtain second transfer data;
in this embodiment, the public key pair "pqqeifns!is encrypted based on! SDSD # @ # # "is encrypted to obtain second transfer data.
204. Adding an identification character string with a preset number of bytes in the preamble of the second transfer data to obtain a data ciphertext, wherein the data access instruction comprises: a cloud service operation instruction;
in this embodiment, the number of bytes is 8 bytes, that is, "QWERTYUI" is used as the identification string, and is added to the beginning of the second relay data as the header file to generate the data ciphertext.
205. Performing character conversion processing on character strings in the data cipher text according to a preset BASE64 encryption conversion algorithm to obtain first processing data;
in this embodiment, the BASE64 encryption transformation algorithm is a set of transform-coding mapping relationships, and sequentially transforms each character of the data cipher text. The "DDDFFSAG" encryption is converted into "rererkztquuc ═ in such a manner that the entire data ciphertext is converted into the first processed data.
206. Traversing the first processing data, and judging whether the first processing data has a plus sign character or not;
in this embodiment, the entire first processed data is traversed to determine whether a "+" character exists.
207. If yes, changing all plus characters in the first processing data into minus characters to obtain second processing data, and traversing the second processing data to judge whether the second processing data has forward slash characters;
in this embodiment, all "+" in the first processed data are replaced with "-" to obtain second processed data. And scanning all character strings in the second processing data, and judging whether the/character exists.
208. If the forward-slash characters exist, changing all the forward-slash characters in the second processing data into underline characters to obtain the identity codes;
in the embodiment, the "/" characters exist, all the "/" characters are converted into "_", and the data after the replacement of all the "/" characters in the second processing data is determined as the identification code.
209. If no forward slash character exists, determining the second processing data as the identity identification code;
in the embodiment, if there is no "/" present, the second processing data is directly confirmed to be the identification code.
210. If no plus sign character exists, traversing the first processing data, and judging whether the first processing data has a forward slash character or not;
in this embodiment, there is no "+" traversal to read the entire first processed data, and it is determined whether "/" exists in the first processed data.
211. If the forward-slash characters exist, changing all the forward-slash characters in the first processing data into underline characters to obtain the identity codes;
in the embodiment, all existing "/" are replaced with "_" in the same way, and the replaced data is determined as the identification code.
212. If no forward slash character exists, determining the first processing data as the identity identification code;
in the present embodiment, the first processed data where "/" and "+" do not exist is confirmed as the identification code.
213. Detecting and processing the character strings in the data access instruction according to a preset regular rule, and judging that the character strings have a character arrangement combination corresponding to the login authorization request;
in this embodiment, the combination of the character arrangement of the login authorization request is { DSD … …% }, and the whole data is scanned and determined by using the regular rule, so as to determine whether the character arrangement sequence of DSD … …% is met.
214. If the login authorization request does not exist, the identity identification code and the cloud service operation instruction are sent to a preset Google Driver cloud service server, and an access authentication mark code returned by the Google Driver cloud service server is received;
215. if the login authorization request exists, the identity identification code is sent to a preset Google Driver cloud service server, and a login mark code returned by the Google Driver cloud service server is acquired;
216. and sending the login mark code and the cloud service operation instruction to a Google Driver cloud service server, and receiving an access authentication mark code returned by the Google Driver cloud service server.
Embodiments 214-216 are similar to the scheme of the first embodiment, and reference may be made to the first embodiment, which is not described herein again.
In the embodiment of the invention, the user name and the user password are combined integrally, the identity is obtained through RSA algorithm encryption and BASE64 encryption conversion algorithm, and the verification token returned by the Google Driver cloud service server is obtained by sending the request to the Google Driver cloud service server. The method overcomes the defect that the Google Driver cloud service access must be realized by means of the client or the API, reduces the steps of data processing, and improves the efficiency and the application range of the cloud service access.
Referring to fig. 3, a third embodiment of the authentication acquisition method for Google Driver cloud service according to the embodiment of the present invention includes:
301. receiving an input user name and a user password, acquiring a data access instruction, and encrypting the user name and the user password to obtain a data ciphertext, wherein the data access instruction comprises: a cloud service operation instruction;
302. carrying out transcoding processing on the data ciphertext according to a preset transcoding algorithm to obtain an identity code;
303. judging whether a login authorization request exists in the data access instruction;
the embodiments 301-303 are similar to the schemes in the first embodiment, and the first embodiment can be referred to, which is not described herein again.
304. If a login authorization request exists, constructing a hypertext transfer protocol request frame based on a communication protocol of Google Driver cloud service, and filling a user name and an identity identification code serving as request parameters into the hypertext transfer protocol request frame to obtain a hypertext transfer protocol request;
in this embodiment, the communication protocol of the Google Driver cloud service has multiple implementation manners, which commonly includes TCP/IP, IIC protocol, SPI protocol, and UART protocol, and the request frame is constructed based on the communication protocol to fill the character strings of the user name and the IDuser into the frame.
305. Sending the hypertext transfer protocol request to a Google Driver cloud service server;
in the embodiment, the request corresponding to the modification is sent to the Google Driver cloud service server, and analysis and data processing are carried out based on the request of the Google Driver cloud service server.
306. Receiving processing data returned by the Google Driver cloud service server, extracting key value pairs from the processing data line by line, matching an Auth character string based on the key value pairs, and finding an access authentication mark code;
in this embodiment, the returned data is received, the row-by-row key value extraction is performed on the returned data, the Auth character is matched, and finally the authenticated token is obtained.
307. If the login authorization request does not exist, constructing a hypertext transfer protocol request framework based on a communication protocol of the Google Driver cloud service, filling the identity identification code and the cloud service operation instruction into the hypertext transfer protocol request framework, and obtaining a first hypertext transfer protocol request
In the embodiment, similar to step 304, the identity code and the cloud service operation instruction are filled in the framework.
308. Sending the first hypertext transfer protocol request to a Google Driver cloud service server;
in this embodiment, similar to step 305, further description is omitted here.
309. Receiving first return data returned by the Google Driver cloud service server, extracting key value pairs of the first return data line by line, and matching according to the key value pairs to obtain a login mark code;
in this embodiment, similar to step 306, further description is omitted here.
310. Filling the login mark code and the cloud service operation instruction into a hypertext transfer protocol request frame to obtain a second hypertext transfer protocol request;
in this embodiment, similar to step 304, the login tag code and the cloud service operation instruction are filled into the request frame.
311. Sending the second hypertext transfer protocol request to a Google Driver cloud service server;
in this embodiment, similar to step 305, further description is omitted here.
312. And receiving second return data returned by the Google Driver cloud service server, extracting key value pairs of the second return data line by line, matching an Auth character string according to the key value pairs, and finding an access authentication mark code.
In this embodiment, each row of the received second returned data is a key value pair, and the key and the value are connected with equal sign, for example, if Auth is imooc, the authentication mark code imooc can be obtained according to the key Auth.
In the embodiment of the invention, the user name and the user password are combined integrally, the identity is obtained through RSA algorithm encryption and BASE64 encryption conversion algorithm, and the verification token returned by the Google Driver cloud service server is obtained by sending the request to the Google Driver cloud service server. The method overcomes the defect that the Google Driver cloud service access must be realized by means of the client or the API, reduces the steps of data processing, and improves the efficiency and the application range of the cloud service access.
In the above description of the authentication acquisition method of the Google Driver cloud service in the embodiment of the present invention, referring to fig. 4, an authentication acquisition apparatus of the Google Driver cloud service in the embodiment of the present invention is described below, and an embodiment of the authentication acquisition apparatus of the Google Driver cloud service in the embodiment of the present invention includes:
a receiving module 401, configured to receive an input user name and a user password, obtain a data access instruction, and encrypt the user name and the user password to obtain a data ciphertext, where the data access instruction includes: a cloud service operation instruction;
the transcoding module 402 is configured to transcode the data ciphertext according to a preset transcoding algorithm to obtain an identity code;
a judging module 403, configured to judge whether a login authorization request exists in the data access instruction;
the first authentication acquisition module 404 is configured to send the identity identifier and the cloud service operation instruction to a preset Google Driver cloud service server if a login authorization request does not exist, and receive an access authentication mark code returned by the Google Driver cloud service server;
the mark acquisition module 405 is configured to send the identity identifier to a preset Google Driver cloud service server if a login authorization request exists, and acquire a login mark code returned by the Google Driver cloud service server;
and the second authentication acquisition module 406 is configured to send the login marking code and the cloud service operation instruction to the Google Driver cloud service server, and receive an access authentication marking code returned by the Google Driver cloud service server.
In the embodiment of the invention, the user name and the user password are combined integrally, the identity is obtained through RSA algorithm encryption and BASE64 encryption conversion algorithm, and the verification token returned by the Google Driver cloud service server is obtained by sending the request to the Google Driver cloud service server. The method overcomes the defect that the Google Driver cloud service access must be realized by means of the client or the API, reduces the steps of data processing, and improves the efficiency and the application range of the cloud service access.
Referring to fig. 5, another embodiment of the authentication acquisition apparatus for Google Driver cloud service in the embodiment of the present invention includes:
a receiving module 401, configured to receive an input user name and a user password, obtain a data access instruction, and encrypt the user name and the user password to obtain a data ciphertext, where the data access instruction includes: a cloud service operation instruction;
the transcoding module 402 is configured to transcode the data ciphertext according to a preset transcoding algorithm to obtain an identity code;
a judging module 403, configured to judge whether a login authorization request exists in the data access instruction;
the first authentication acquisition module 404 is configured to send the identity identifier and the cloud service operation instruction to a preset Google Driver cloud service server if a login authorization request does not exist, and receive an access authentication mark code returned by the Google Driver cloud service server;
the mark acquisition module 405 is configured to send the identity identifier to a preset Google Driver cloud service server if a login authorization request exists, and acquire a login mark code returned by the Google Driver cloud service server;
and the second authentication acquisition module 406 is configured to send the login marking code and the cloud service operation instruction to the Google Driver cloud service server, and receive an access authentication marking code returned by the Google Driver cloud service server.
Wherein the receiving module 401 is specifically configured to:
receiving an input user name and a user password, and integrally splicing the user name and the password to obtain first transfer data;
acquiring an encryption public key of the Google Driver cloud service;
performing algorithm conversion processing on the first transfer data based on an RSA encryption algorithm according to the encryption public key to obtain second transfer data;
and adding an identification character string with a preset number of bytes in the preamble of the second transit data to obtain a data ciphertext.
Wherein the transcoding module 402 is specifically configured to:
performing character conversion processing on the character string in the data ciphertext according to a preset BASE64 encryption conversion algorithm to obtain first processing data;
traversing the first processing data, and judging whether plus sign characters exist in the first processing data;
if yes, changing all plus characters in the first processing data into minus characters to obtain second processing data, and traversing the second processing data to judge whether the second processing data has forward and oblique stroke characters;
if the forward-slash characters exist, changing all the forward-slash characters in the second processing data into underline characters to obtain the identity codes; if no forward slash character exists, confirming the second processing data as the identity identification code;
if no plus sign character exists, traversing the first processing data, and judging whether the first processing data has a forward slash character or not;
if the forward-slash characters exist, changing all the forward-slash characters in the first processing data into underline characters to obtain an identity code;
and if the forward and oblique stroke characters do not exist, confirming the first processing data as the identity identification code.
The determining module 403 is specifically configured to:
and detecting the character strings in the data access instruction according to a preset regular rule, and judging that the character strings have a character arrangement combination corresponding to the login authorization request.
Wherein the first authentication obtaining module 404 includes:
a filling unit 4041, configured to construct a hypertext transfer protocol request frame based on a communication protocol of the Google Driver cloud service, and fill the user name and the identity identifier as request parameters into the hypertext transfer protocol request frame to obtain a hypertext transfer protocol request;
a sending unit 4042, configured to send the hypertext transfer protocol request to the Google Driver cloud service server;
the extraction unit 4043 is configured to receive processing data returned by the Google Driver cloud service server, extract key-value pairs for the processing data line by line, and find an access authentication mark code based on matching of the key-value pairs with an Auth character string.
The mark acquiring module 405 is specifically configured to:
constructing a hypertext transfer protocol request framework based on a communication protocol of the Google Driver cloud service, and filling the identity identification code and the cloud service operation instruction into the hypertext transfer protocol request framework to obtain a first hypertext transfer protocol request
Sending the first hypertext transfer protocol request to a Google Driver cloud service server;
and receiving first return data returned by the Google Driver cloud service server, extracting key value pairs of the first return data line by line, and matching to obtain a login mark code according to the key value pairs.
The second authentication obtaining module 406 is specifically configured to:
filling the login mark code and the cloud service operation instruction into the hypertext transfer protocol request frame to obtain a second hypertext transfer protocol request;
sending the second hypertext transfer protocol request to the Google Driver cloud service server;
and receiving second return data returned by the Google Driver cloud service server, extracting key value pairs of the second return data line by line, and finding an access authentication mark code according to the matching of the key value pairs with an Auth character string.
In the embodiment of the invention, the user name and the user password are combined integrally, the identity is obtained through RSA algorithm encryption and BASE64 encryption conversion algorithm, and the verification token returned by the Google Driver cloud service server is obtained by sending the request to the Google Driver cloud service server. The method overcomes the defect that the Google Driver cloud service access must be realized by means of the client or the API, reduces the steps of data processing, and improves the efficiency and the application range of the cloud service access.
Fig. 4 and 5 describe the authentication acquisition apparatus of the Google Driver cloud service in the embodiment of the present invention in detail from the perspective of the modular functional entity, and the following describes the authentication acquisition apparatus of the Google Driver cloud service in the embodiment of the present invention in detail from the perspective of hardware processing.
Fig. 6 is a schematic structural diagram of an authentication acquisition device of a Google Driver cloud service according to an embodiment of the present invention, where the authentication acquisition device 600 of the Google Driver cloud service may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 610 (e.g., one or more processors) and a memory 620, and one or more storage media 630 (e.g., one or more mass storage devices) storing applications 633 or data 632. Memory 620 and storage medium 630 may be, among other things, transient or persistent storage. The program stored in the storage medium 630 may include one or more modules (not shown), each of which may include a series of instruction operations in the authentication acquisition apparatus 600 for the Google Driver cloud service. Still further, the processor 610 may be configured to communicate with the storage medium 630 to execute a series of instruction operations in the storage medium 630 on the authentication acquisition device 600 of the Google Driver cloud service.
The Google Driver cloud service based authentication acquisition device 600 may also include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input-output interfaces 560, and/or one or more operating systems 631, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, and the like. Those skilled in the art will appreciate that the configuration of the authentication acquisition device of the Google Driver cloud service shown in fig. 6 does not constitute a limitation of the authentication acquisition device based on the Google Driver cloud service, and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components.
The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium, and may also be a volatile computer-readable storage medium, having stored therein instructions, which, when executed on a computer, cause the computer to perform the steps of the authentication acquisition method for the Google Driver cloud service.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses, and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. An authentication acquisition method of Google Driver cloud service is characterized by comprising the following steps:
receiving an input user name and a user password, acquiring a data access instruction, and encrypting the user name and the user password to obtain a data ciphertext, wherein the data access instruction comprises: a cloud service operation instruction;
transcoding the data ciphertext according to a preset transcoding algorithm to obtain an identity code;
judging whether a login authorization request exists in the data access instruction;
if the login authorization request does not exist, the identity identification code and the cloud service operation instruction are sent to a preset Google Driver cloud service server, and an access authentication mark code returned by the Google Driver cloud service server is received;
if the login authorization request exists, the identity identification code is sent to a preset Google Driver cloud service server, and a login mark code returned by the Google Driver cloud service server is acquired;
and sending the login mark code and the cloud service operation instruction to the Google Driver cloud service server, and receiving an access authentication mark code returned by the Google Driver cloud service server.
2. The method for obtaining Google Driver cloud service authentication according to claim 1, wherein the receiving an input user name and user password and obtaining a data access instruction, and the encrypting the user name and user password to obtain a data ciphertext comprises:
receiving an input user name and a user password, and integrally splicing the user name and the user password to obtain first transfer data;
acquiring an encryption public key of the Google Driver cloud service;
performing algorithm conversion processing on the first transfer data based on an RSA encryption algorithm according to the encryption public key to obtain second transfer data;
and adding an identification character string with a preset number of bytes at the beginning of the second transit data to obtain a data ciphertext.
3. The Google Driver cloud service authentication acquisition method of claim 1, wherein the transcoding the data ciphertext according to a preset transcoding algorithm to obtain the identity code comprises:
performing character conversion processing on the character string in the data ciphertext according to a preset BASE64 encryption conversion algorithm to obtain first processing data;
traversing the first processing data, and judging whether plus sign characters exist in the first processing data;
if yes, changing all plus characters in the first processing data into minus characters to obtain second processing data, and traversing the second processing data to judge whether the second processing data has forward and oblique stroke characters;
if the forward-slash characters exist, changing all the forward-slash characters in the second processing data into underline characters to obtain the identity codes; if no forward slash character exists, confirming the second processing data as the identity identification code;
if no plus sign character exists, traversing the first processing data, and judging whether the first processing data has a forward slash character or not;
if the forward-slash characters exist, changing all the forward-slash characters in the first processing data into underline characters to obtain an identity code;
and if the forward and oblique stroke characters do not exist, confirming the first processing data as the identity identification code.
4. The method for obtaining Google Driver cloud service authentication according to claim 1, wherein said determining whether a login authorization request exists in the data access command comprises:
and detecting the character strings in the data access instruction according to a preset regular rule, and judging that the character strings have a character arrangement combination corresponding to the login authorization request.
5. The method for acquiring the Google Driver cloud service authentication as claimed in claim 1, wherein the sending the identity code and the cloud service operation command to a preset Google Driver cloud service server, and the receiving an access authentication mark code returned by the Google Driver cloud service server comprises:
constructing a hypertext transfer protocol request frame based on a communication protocol of the Google Driver cloud service, and filling the user name and the identity identification code as request parameters into the hypertext transfer protocol request frame to obtain a hypertext transfer protocol request;
sending the hypertext transfer protocol request to the Google Driver cloud service server;
and receiving processing data returned by the Google Driver cloud service server, extracting key value pairs from the processing data line by line, and finding an access authentication mark code based on matching Auth character strings of the key value pairs.
6. The method for acquiring authentication of the Google Driver cloud service according to claim 1, wherein the sending the identification code to a preset Google Driver cloud service server, and the acquiring of the login mark code returned by the Google Driver cloud service server comprises:
constructing a hypertext transfer protocol request framework based on a communication protocol of the Google Driver cloud service, and filling the identity identification code and the cloud service operation instruction into the hypertext transfer protocol request framework to obtain a first hypertext transfer protocol request;
sending the first hypertext transfer protocol request to a Google Driver cloud service server;
and receiving first return data returned by the Google Driver cloud service server, extracting key value pairs of the first return data line by line, and matching to obtain a login mark code according to the key value pairs.
7. The method for obtaining Google Driver cloud service authentication according to claim 6, wherein the sending the login mark code and the cloud service operation instruction to the Google Driver cloud service server, and the receiving an access authentication mark code returned by the Google Driver cloud service server includes:
filling the login mark code and the cloud service operation instruction into the hypertext transfer protocol request frame to obtain a second hypertext transfer protocol request;
sending the second hypertext transfer protocol request to the Google Driver cloud service server;
and receiving second return data returned by the Google Driver cloud service server, extracting key value pairs of the second return data line by line, and finding an access authentication mark code according to the matching of the key value pairs with an Auth character string.
8. An authentication acquisition device of a Google Driver cloud service, the authentication acquisition device of the Google Driver cloud service comprising:
the receiving module is used for receiving an input user name and a user password, acquiring a data access instruction, and encrypting the user name and the user password to obtain a data ciphertext, wherein the data access instruction comprises: a cloud service operation instruction;
the transcoding module is used for transcoding the data ciphertext according to a preset transcoding algorithm to obtain an identity code;
the judging module is used for judging whether a login authorization request exists in the data access instruction;
the first authentication acquisition module is used for sending the identity identification code and the cloud service operation instruction to a preset Google Driver cloud service server and receiving an access authentication mark code returned by the Google Driver cloud service server if a login authorization request does not exist;
the mark acquisition module is used for sending the identity identification code to a preset Google Driver cloud service server if a login authorization request exists, and acquiring a login mark code returned by the Google Driver cloud service server;
and the second authentication acquisition module is used for sending the login mark code and the cloud service operation instruction to the Google Driver cloud service server and receiving an access authentication mark code returned by the Google Driver cloud service server.
9. An authentication acquisition device of a Google Driver cloud service, the authentication acquisition device of the Google Driver cloud service comprising: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line;
the at least one processor invokes the instructions in the memory to cause an authentication acquisition device of the Google Driver cloud service to perform the authentication acquisition method of the Google Driver cloud service of any of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the authentication acquisition method of the Google Driver cloud service according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011632907.1A CN112671796B (en) | 2020-12-31 | 2020-12-31 | Google Driver cloud service authentication acquisition method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011632907.1A CN112671796B (en) | 2020-12-31 | 2020-12-31 | Google Driver cloud service authentication acquisition method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112671796A CN112671796A (en) | 2021-04-16 |
CN112671796B true CN112671796B (en) | 2022-03-25 |
Family
ID=75413182
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011632907.1A Active CN112671796B (en) | 2020-12-31 | 2020-12-31 | Google Driver cloud service authentication acquisition method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112671796B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114401278B (en) * | 2021-12-27 | 2023-11-17 | 深圳软牛科技有限公司 | Cross-platform transmission method, system, equipment and storage medium for Line App data |
CN114048402B (en) * | 2022-01-12 | 2022-04-22 | 深圳软牛科技有限公司 | FRP lock removing method, device, equipment and storage medium of Android system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2012144909A1 (en) * | 2011-04-19 | 2012-10-26 | Invenia As | Method for secure storing of a data file via a computer communication network |
CN104202164A (en) * | 2014-08-28 | 2014-12-10 | 西安宙合网络科技有限公司 | Method for protecting cloud service information by adopting digital certificate and cloud server |
CN105471897A (en) * | 2015-12-28 | 2016-04-06 | 上海庆科信息技术有限公司 | Embedded device cloud service access method and system |
CN111984459A (en) * | 2019-05-21 | 2020-11-24 | 深圳软牛科技有限公司 | Apple ID account removing method and system |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110289322A1 (en) * | 2007-12-14 | 2011-11-24 | Rasti Mehran | Protected use of identity identifier objects |
US8544072B1 (en) * | 2009-10-13 | 2013-09-24 | Google Inc. | Single sign-on service |
US9418216B2 (en) * | 2011-07-21 | 2016-08-16 | Microsoft Technology Licensing, Llc | Cloud service authentication |
WO2014126898A1 (en) * | 2013-02-12 | 2014-08-21 | BackPeddle, LLC | Sharing content in social networks |
WO2016025944A1 (en) * | 2014-08-15 | 2016-02-18 | Lawrence Douglas | A system and method for digital authentication |
US11140146B2 (en) * | 2018-12-27 | 2021-10-05 | Konica Minolta Laboratory U.S.A., Inc. | Method and system for seamless single sign-on (SSO) for native mobile-application initiated open-ID connect (OIDC) and security assertion markup language (SAML) flows |
-
2020
- 2020-12-31 CN CN202011632907.1A patent/CN112671796B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2012144909A1 (en) * | 2011-04-19 | 2012-10-26 | Invenia As | Method for secure storing of a data file via a computer communication network |
CN104202164A (en) * | 2014-08-28 | 2014-12-10 | 西安宙合网络科技有限公司 | Method for protecting cloud service information by adopting digital certificate and cloud server |
CN105471897A (en) * | 2015-12-28 | 2016-04-06 | 上海庆科信息技术有限公司 | Embedded device cloud service access method and system |
CN111984459A (en) * | 2019-05-21 | 2020-11-24 | 深圳软牛科技有限公司 | Apple ID account removing method and system |
Also Published As
Publication number | Publication date |
---|---|
CN112671796A (en) | 2021-04-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113259133B (en) | Encryption communication method, equipment and storage medium based on HTTP protocol | |
CN110493261B (en) | Verification code obtaining method based on block chain, client, server and storage medium | |
CN105099692B (en) | Security verification method and device, server and terminal | |
CN103607284B (en) | Identity authentication method and equipment and server | |
CN112367164B (en) | Service request processing method and device, computer equipment and storage medium | |
CN110933118A (en) | Edge computing gateway secure communication method, system, terminal equipment and server | |
CN104796257A (en) | Flexible data authentication | |
CN107908632B (en) | Website file processing method and device, website file processing platform and storage medium | |
CN105025041A (en) | File upload method, file upload apparatus and system | |
EP2854331A1 (en) | Method and System for Authenticating a User of a Device | |
KR101897085B1 (en) | Apparatus and method for generating a realtime password and storage medium | |
CN111182525A (en) | Method and device for storing data | |
CN103546432A (en) | Method and system for realizing cross-domain jumping, browser and domain name servers | |
CN112671796B (en) | Google Driver cloud service authentication acquisition method, device, equipment and storage medium | |
CN114285575B (en) | Image encryption and decryption method and device, storage medium and electronic device | |
CN112615834A (en) | Security authentication method and system | |
CN105765941A (en) | Illegal access server prevention method and device | |
CN113961893A (en) | User login method and device based on block chain, electronic equipment and storage medium | |
CN107580002B (en) | Double-factor authentication security manager login system and method | |
US20080284565A1 (en) | Apparatus, System and Methods for Supporting an Authentication Process | |
CN104618356A (en) | Identity verification method and device | |
CN110266641B (en) | Information reading method, system, device, and computer-readable storage medium | |
CN103428176A (en) | Mobile user accessing mobile Internet application method and system and application server | |
US20240388438A1 (en) | Data processing method and apparatus, program product, computer device, and storage medium | |
CN107644168B (en) | Information extraction method, terminal and computer readable storage medium |
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 | ||
CP03 | Change of name, title or address |
Address after: 1301-1310, building 2, jinlitong financial center building, 1100 Xingye Road, Haiwang community, Xin'an street, Bao'an District, Shenzhen, Guangdong 518000 Patentee after: Shenzhen Ruan Niu Technology Group Co.,Ltd. Address before: No.2903, 15-3, Haitian Road, building C, excellence Times Plaza, n23, Haiwang community, Xin'an street, Bao'an District, Shenzhen City, Guangdong Province Patentee before: AFIRSTSOFT CO.,LTD. |
|
CP03 | Change of name, title or address |