Movatterモバイル変換


[0]ホーム

URL:


CN108900465A - A kind of SNS platform authorization requests acquisition methods, information issuing method and its storage equipment - Google Patents

A kind of SNS platform authorization requests acquisition methods, information issuing method and its storage equipment
Download PDF

Info

Publication number
CN108900465A
CN108900465ACN201810392300.7ACN201810392300ACN108900465ACN 108900465 ACN108900465 ACN 108900465ACN 201810392300 ACN201810392300 ACN 201810392300ACN 108900465 ACN108900465 ACN 108900465A
Authority
CN
China
Prior art keywords
information
sns platform
version
user
sns
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810392300.7A
Other languages
Chinese (zh)
Inventor
李恺弘
刘凤橙
庄良基
庄永梁
林溪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen 258 Network Technology Group Ltd By Share Ltd
Original Assignee
Xiamen 258 Network Technology Group Ltd By Share 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 Xiamen 258 Network Technology Group Ltd By Share LtdfiledCriticalXiamen 258 Network Technology Group Ltd By Share Ltd
Priority to CN201810392300.7ApriorityCriticalpatent/CN108900465A/en
Publication of CN108900465ApublicationCriticalpatent/CN108900465A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The present invention provides a kind of SNS platform authorization requests acquisition methods, information issuing method and its storage equipment, server-sides to receive the SNS platform authorization requests of client transmission, and inquires requested SNS platform configuration information;The version that requested SNS platform is based on is judged for OAuth1.0 version or OAuth2.0 version according to OAuth version information and is executed respectively;According to the final AccessToken got, client user's essential information is obtained by the api interface of the acquisition authorized client user information of each SNS platform;The elemental user information includes user's pet name, user's head portrait and User ID.Compared with prior art, for technical solution of the present invention convenient for saving development process, client can faster obtain corresponding SNS platform authorization and release information, and be conducive to the maintenance and management of later period personnel.

Description

A kind of SNS platform authorization requests acquisition methods, information issuing method and its storage equipment
Technical field
The present invention relates to a kind of SNS platform authorization requests acquisition methods, information issuing method and its storage equipment, are related to mutuallyNetworking arenas.
Background technique
SNS, full name SocialNetworking Services, i.e. social network services, is specially intended to that people is helped to establishThe Internet application service of social network.1967, the psychology professor StanleyMilgram of Harvard University (1934~1984) six degrees of separation theory has been founded, briefly:" people that you are spaced between any one stranger does not exceed sixIt is a, that is to say, that at most by six people, you can recognize any one stranger." according to six degrees of separation theory, per each and every oneThe social circle of body all constantly amplifies, and finally becomes a catenet.This is social network (SocialNetworking)Early stage understands.Later someone has founded the Internet service of property network towards the society, by the way that " acquaintance's is ripe according to this theoryPeople " carries out network social intercourse expansion.In society, the exchange of person to person is by interpersonal introduction, shakes hands come shapeIt is enclosed at a circle of friends, connection, everyone does not need directly to recognize owner, it is only necessary to pass through his friend, the friend of friendFriend can facilitate and once shake hands.And common Computer Mediated Communication, then it is most of to be realized by certain platforms, for example oneself is putInto a platform, many people is allowed to see, and contacts you and recognize you.The advantage and disadvantage of the two are obvious, social communication advantageIt is that reliably, relationship is established on reliable interpersonal relationships net each other, the disadvantage is that generating, the time shaken hands is long, and cost is higher, platform-typeComputer Mediated Communication advantage is at low cost, but unreliable.With the fast development of internet, the social activity of people is also gradually from realityLife is transferred to internet, and different social platforms often has the absorbed field for oneself being different from other platforms, peopleOften suffer from the account of oneself in different platforms, therefore just there are more and more enterprises to start in different social platformsIt establishes the homepage issuing advertisement of oneself, promote product.
Since more and more outstanding SNS platforms continue to bring out, company manager is also required to different SNS platforms and establishesHomepage, when needing releasing advertisements or promoting product, it is necessary to go major SNS platform to log in postedit information, then issueInformation.Although major SNS platform is all provided with api interface now, due to OAuth certification have it is 1.0 and 2.0 two differentMode, this adds increased the docking difficulty of developer.
When needing to increase a new SNS platform, it is to be understood that the api interface that it is provided be based on OAuth1.0 orThen OAuth2.0 identifying procedure establishes the interface class of API docking according to OAuth version.
Since the identifying procedure of OAuth1.0 is different from OAuth2.0, and the api interface identifying procedure of different SNS platformsThere are also subtle difference, developer requires to consult each platform since authenticating step when docking different SNS platforms every timeAPI document.
Company manager to Mr. Yu advertisement or some popularization product is inconvenient to which platform known to have issued.
Summary of the invention
The present invention provides a kind of SNS platform authorization requests acquisition methods, and are easy to implement the storage equipment of this method, toolHave convenient for saving development process, the characteristics of client faster obtains corresponding SNS platform authorization.
The present invention also provides a kind of methods using authorized SNS platform release information, and are easy to implement the partyThe storage equipment of method has convenient for saving development process, and client can faster utilize authorized SNS platform invention informationThe characteristics of.
A kind of SNS platform authorization requests acquisition methods provided according to the present invention, method include:
Client sends SNS platform authorization requests;
Server-side receives the SNS platform authorization requests of client transmission, and inquires requested SNS platform configuration information;The configuration information includes OAuth version information, Scope, APPSecret and APPID;
Server-side judges the version that requested SNS platform is based on for OAuth1.0 version according to OAuth version informationOr OAuth2.0 version;
It is executed if version is OAuth1.0 version:
The parameter of request is generated signature signature according to OAuth1.0 standard;
To corresponding api interface request RequestToken, and receive return RequestToken andRequestSecret;
The RequestToken and RequestSecret returned according to interface goes SNS platform to request finallyAccessToken and Token expired time;
It is executed if version is OAuth2.0 version:
AuthCode is requested to corresponding api interface, and receives the AuthCode of return;
SNS platform is gone to request final AccessToken and Token using the AuthCode that corresponding api interface returnsExpired time;
Server-side passes through the acquisition authorization user information of each SNS platform according to the final AccessToken gotApi interface obtain user basic information;The elemental user information includes user's pet name, user's head portrait and User ID.
The method also includes, server-sides according to the API RequestToken returned and RequestSecret, orAuthCode combines the OAuth required parameter of corresponding version;According to combined required parameter, corresponding SNS platform authorization is jumped toThe page makes client user log in SNS account to authorize;
Judge whether user agrees to authorize, if agreeing to authorization, records the AccessToken's and Token of API returnExpiration time;If disagreeing authorization, record log, authorization flow terminates.
The method also includes:After client user edits the information for needing to issue, selection needs the authorization SNS issuedPlatform;Server-side needs the information issued to be published to major SNS platform in order according to current task amount, user.
A kind of method using authorized SNS platform release information provided according to the present invention, it is flat based on above-mentioned SNSPlatform authorization requests acquisition methods, method include:
Client user edits the information to be issued and selects authorized SNS platform;
Server-side reads the AccessToken authorized and judges corresponding SNS platform OAuth version;If it isThe platform of OAuth1.0 then generates corresponding signature signature according to the parameter of this request;Request each SNS platformThe api interface of release information submits the text information for needing to issue and uploading pictures data;SNS platform api interface is received to returnPublication whether successful information.
The method also includes recording publication successful information if issued successfully;If publication failure, records mistakeLose log.
A kind of storage equipment provided according to the present invention, is stored with a plurality of instruction, and described instruction includes adding convenient for processorIt carries and handles:
Receive the SNS platform authorization requests of client transmission, and inquires requested SNS platform configuration information;It is described to matchConfidence breath includes OAuth version information, Scope, APPSecret and APPID;
According to OAuth version information judge the version that requested SNS platform is based on for OAuth1.0 version stillOAuth2.0 version;
It is executed if version is OAuth1.0 version:
The parameter of request is generated signature signature according to OAuth1.0 standard;
To corresponding api interface request RequestToken, and receive return RequestToken andRequestSecret;
The RequestToken and RequestSecret returned according to interface goes SNS platform to request finallyAccessToken and Token expired time;
It is executed if version is OAuth2.0 version:
AuthCode is requested to corresponding api interface, and receives the AuthCode of return;
SNS platform is gone to request final AccessToken and Token using the AuthCode that corresponding api interface returnsExpired time;
According to the final AccessToken got, pass through the acquisition authorized client user information of each SNS platformApi interface obtain client user's essential information;The elemental user information includes user's pet name, user's head portrait and userID。
Described instruction further includes loading and handling convenient for processor:According to API return RequestToken andRequestSecret or AuthCode combines the OAuth required parameter of corresponding version;According to combined required parameter, jumpMake client user log in SNS account to corresponding SNS platform authorization page to authorize;
Judge whether user agrees to authorize, if agreeing to authorization, records the AccessToken's and Token of API returnExpiration time;If disagreeing authorization, record log, authorization flow terminates.
Described instruction further includes loading and handling convenient for processor:According to current task amount, client user is neededThe information of publication is published to major SNS platform in order.
Described instruction further includes loading and handling convenient for processor:
The authorized SNS platform of the information to be issued and selection that reading client user edits;According to having authorizedAccessToken and judge corresponding SNS platform OAuth version;If it is the platform of OAuth1.0, then according to this requestParameter generate corresponding signature signature;It requests the api interface of the release information of each SNS platform to be submitted to need to issueText information and uploading pictures data;Receive SNS platform api interface return publication whether successful information.
Described instruction further includes loading and handling convenient for processor:
If issued successfully, publication successful information is recorded;If publication failure, records unsuccessfully log.
Compared with prior art, convenient for saving development process, client can be obtained faster accordingly technical solution of the present inventionSNS platform authorization and release information, and it is conducive to the maintenance and management of later period personnel.
Detailed description of the invention
Fig. 1 is the SNS platform authorization requests acquisition methods process schematic illustration of a wherein embodiment of the invention.
Fig. 2 is the utilization method flow principle that authorized SNS platform releases news of a wherein embodiment of the inventionSchematic diagram.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, rightThe present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, notFor limiting the present invention.
Any feature disclosed in this specification (including abstract and attached drawing) unless specifically stated can be equivalent by otherOr the alternative features with similar purpose are replaced.That is, unless specifically stated, each feature is a series of equivalent or classLike an example in feature.
As shown in Figure 1, a kind of SNS platform authorization requests acquisition methods, method include:
Client sends SNS platform authorization requests;
Server-side receives the SNS platform authorization requests of client transmission, and inquires requested SNS platform configuration information;The configuration information includes OAuth version information, Scope, APPSecret and APPID etc.;
Server-side judges the version that requested SNS platform is based on for OAuth1.0 version according to OAuth version informationOr OAuth2.0 version;
It is executed if version is OAuth1.0 version:
The parameter of request is generated signature signature according to OAuth1.0 standard;
To corresponding api interface request RequestToken, and receive return RequestToken andRequestSecret;
The RequestToken and RequestSecret returned according to interface goes SNS platform to request finallyAccessToken and Token expired time;
It is executed if version is OAuth2.0 version:
AuthCode is requested to corresponding api interface, and receives the AuthCode of return;
SNS platform is gone to request final AccessToken and Token using the AuthCode that corresponding api interface returnsExpired time;
Server-side passes through the acquisition authorization user information of each SNS platform according to the final AccessToken gotApi interface obtain user basic information;The elemental user information includes user's pet name, user's head portrait and User ID etc..
Different API requests, which is combined, according to different OAuth versions links parametric form.
If it is OAuth1.0, request step is as follows:
1. before generating link every time, the parameter of request is generated signature signature according to OAuth1.0 standard;
2. then request RequestToken, api interface returns to RequestToken and RequestSecret;
3. the interim RequestToken and RequestSecret that are returned according to interface go SNS platform to request finallyAccessToken and Token expired time.
If it is OAuth2.0, request step is as follows:
1. requesting AuthCode, api interface returns to AuthCode;
2. going SNS platform to request final AccessToken and Token expired using the AuthCode that api interface returnsTime.
Called different OAuth authentication modes, if it is OAuth1.0, then need to be asked according to this according to different versionsThe parameter asked generates corresponding signature signature.
Required parameter is combined according to OAuth version, then needs to request RequestToken if it is OAuth1.0, andOAuth2.0 then needs to request AuthCode.
Technical solution of the present invention provides SNS platform unified authorization and release information based on OAuth1.0 and OAuth2.0Scheme, conducive to the maintenance and management of later period personnel.Data memory module uses Doctrine, for the interim of API requestToken data are just preserved by the way of temporary file, and use just deletes temporary file (such as OAuth1.0 laterRequestToken, RequestSecret, the AuthCode of OAuth2.0);And the AccessToken of final API request andThe data such as TokenTime are then saved in MySQL database.
In addition, the present invention program used ReactPHP frame realize event-driven, asynchronous execution, Non-Blocking I/O andIt is single thread one process, efficiency of code execution is high.
The HTTP request module of the present invention program all uses Guzzle, this is for post request, Asynchronous Request, upload textPart, proxy requests etc. all become easy processing.
The method also includes, server-sides according to the API RequestToken returned and RequestSecret, orAuthCode combines the OAuth required parameter of corresponding version;According to combined required parameter, corresponding SNS platform authorization is jumped toThe page makes client user log in SNS account to authorize;
Judge whether user agrees to authorize, if agreeing to authorization, records the AccessToken's and Token of API returnExpiration time;If disagreeing authorization, record log, authorization flow terminates.
If disagreeing authorization, the essential information for obtaining client user is no longer gone.
Log module uses Monolog, facilitates the classification for carrying out log and record, and retrospect error message is also rapider.
The method also includes:After client user edits the information for needing to issue, selection needs the authorization SNS issuedPlatform;Server-side needs the information issued to be published to major SNS platform in order according to current task amount, user.
A kind of method using authorized SNS platform release information as shown in Figure 2, is awarded based on above-mentioned SNS platformRequest method is weighed, method includes:
Client user edits the information to be issued and selects authorized SNS platform;
Server-side reads the AccessToken authorized and judges corresponding SNS platform OAuth version;If it isThe platform of OAuth1.0 then generates corresponding signature signature according to the parameter of this request;Request each SNS platformThe api interface of release information submits the text information for needing to issue and uploading pictures data;SNS platform api interface is received to returnPublication whether successful information.
The method also includes recording publication successful information if issued successfully;If publication failure, records mistakeLose log.
A kind of storage equipment provided according to the present invention, is stored with a plurality of instruction, and described instruction includes adding convenient for processorIt carries and handles:
Receive the SNS platform authorization requests of client transmission, and inquires requested SNS platform configuration information;It is described to matchConfidence breath includes OAuth version information, Scope, APPSecret and APPID;
According to OAuth version information judge the version that requested SNS platform is based on for OAuth1.0 version stillOAuth2.0 version;
It is executed if version is OAuth1.0 version:
The parameter of request is generated signature signature according to OAuth1.0 standard;
To corresponding api interface request RequestToken, and receive return RequestToken andRequestSecret;
The RequestToken and RequestSecret returned according to interface goes SNS platform to request finallyAccessToken and Token expired time;
It is executed if version is OAuth2.0 version:
AuthCode is requested to corresponding api interface, and receives the AuthCode of return;
SNS platform is gone to request final AccessToken and Token using the AuthCode that corresponding api interface returnsExpired time;
According to the final AccessToken got, pass through the acquisition authorized client user information of each SNS platformApi interface obtain client user's essential information;The elemental user information includes user's pet name, user's head portrait and userID。
Described instruction further includes loading and handling convenient for processor:According to API return RequestToken andRequestSecret or AuthCode combines the OAuth required parameter of corresponding version;According to combined required parameter, jumpMake client user log in SNS account to corresponding SNS platform authorization page to authorize;
Judge whether user agrees to authorize, if agreeing to authorization, records the AccessToken's and Token of API returnExpiration time;If disagreeing authorization, record log, authorization flow terminates.
Described instruction further includes loading and handling convenient for processor:According to current task amount, client user is neededThe information of publication is published to major SNS platform in order.
Described instruction further includes loading and handling convenient for processor:
The authorized SNS platform of the information to be issued and selection that reading client user edits;According to having authorizedAccessToken and judge corresponding SNS platform OAuth version;If it is the platform of OAuth1.0, then according to this requestParameter generate corresponding signature signature;It requests the api interface of the release information of each SNS platform to be submitted to need to issueText information and uploading pictures data;Receive SNS platform api interface return publication whether successful information.
Described instruction further includes loading and handling convenient for processor:
If issued successfully, publication successful information is recorded;If publication failure, records unsuccessfully log.

Claims (10)

CN201810392300.7A2018-04-272018-04-27A kind of SNS platform authorization requests acquisition methods, information issuing method and its storage equipmentPendingCN108900465A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201810392300.7ACN108900465A (en)2018-04-272018-04-27A kind of SNS platform authorization requests acquisition methods, information issuing method and its storage equipment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201810392300.7ACN108900465A (en)2018-04-272018-04-27A kind of SNS platform authorization requests acquisition methods, information issuing method and its storage equipment

Publications (1)

Publication NumberPublication Date
CN108900465Atrue CN108900465A (en)2018-11-27

Family

ID=64342545

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201810392300.7APendingCN108900465A (en)2018-04-272018-04-27A kind of SNS platform authorization requests acquisition methods, information issuing method and its storage equipment

Country Status (1)

CountryLink
CN (1)CN108900465A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112153025A (en)*2020-09-112020-12-29浪潮电子信息产业股份有限公司 Method and device for realizing OAuth2.0 authentication based on PAM
WO2024230285A1 (en)*2023-05-112024-11-14杭州阿里巴巴海外互联网产业有限公司Object publishing method, computer-readable storage medium, and computer device

Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102394887A (en)*2011-11-102012-03-28杭州东信北邮信息技术有限公司OAuth protocol-based safety certificate method of open platform and system thereof
CN103460215A (en)*2011-03-082013-12-18电话有限公司A method for providing authorized access to a service application in order to use a protected resource of an end user
CN104580115A (en)*2013-10-252015-04-29中国科学院声学研究所Information processing system and method based on virtualization service and SNS information aggregation
CN105100007A (en)*2014-05-082015-11-25国际商业机器公司Method and device used for controlling resource visit
US20160285702A1 (en)*2015-03-232016-09-29Dropbox, Inc.Shared folder backed integrated workspaces
US20170324719A1 (en)*2016-05-082017-11-09Sap SeUser authentication framework

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103460215A (en)*2011-03-082013-12-18电话有限公司A method for providing authorized access to a service application in order to use a protected resource of an end user
CN102394887A (en)*2011-11-102012-03-28杭州东信北邮信息技术有限公司OAuth protocol-based safety certificate method of open platform and system thereof
CN104580115A (en)*2013-10-252015-04-29中国科学院声学研究所Information processing system and method based on virtualization service and SNS information aggregation
CN105100007A (en)*2014-05-082015-11-25国际商业机器公司Method and device used for controlling resource visit
US20160285702A1 (en)*2015-03-232016-09-29Dropbox, Inc.Shared folder backed integrated workspaces
US20170324719A1 (en)*2016-05-082017-11-09Sap SeUser authentication framework

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
3GPP TSG SA WG3 (SECURITY) MEETING #89: "OAuth based service authorization framework for SBA", 《3GPP》*
3GPPTSGSAWG3(SECURITY)MEETING#89: "OAuthbasedserviceauthorizationframeworkforSBA", 《3GPP》*

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112153025A (en)*2020-09-112020-12-29浪潮电子信息产业股份有限公司 Method and device for realizing OAuth2.0 authentication based on PAM
WO2024230285A1 (en)*2023-05-112024-11-14杭州阿里巴巴海外互联网产业有限公司Object publishing method, computer-readable storage medium, and computer device

Similar Documents

PublicationPublication DateTitle
US8745134B1 (en)Cross social network data aggregation
US20190327080A1 (en)Document transfer processing for blockchains
US8886718B2 (en)Providing personalized platform application content
JP2019012529A (en)Document management and collaboration system
JP7294748B2 (en) Method, program and apparatus for sharing data between groups
CN111771194A (en)System and method for generating and maintaining immutable digital conference records within distributed network nodes
HaekalToken-based authentication using JSON web token on SIKASIR RESTful web service
WO2012081404A1 (en)Authentication system, authentication server, service provision server, authentication method, and computer-readable recording medium
CN111327613B (en)Distributed service authority control method and device and computer readable storage medium
CN110636057B (en)Application access method and device and computer readable storage medium
JP5513500B2 (en) Displaying security identities using claims
TW201528023A (en)System and method for facilitating federated user provisioning through a cloud-based system
TW200810460A (en)Authentication of a principal in a federation
JP6194137B1 (en) Method for maintaining a restricted user profile and storage medium including instructions for performing the method
US20090178124A1 (en)Remote device communication platform
US20160381160A1 (en)System and Computer Implemented Method of Personal Monitoring
CN108900465A (en)A kind of SNS platform authorization requests acquisition methods, information issuing method and its storage equipment
JP2019079353A (en)Information processing system, information processing device, information processing method, and program
US10394916B2 (en)Personalized search environment
JP2019079483A (en)Information processing system, information processing device, information processing method, and program
CN115422145A (en) Digital asset processing method, device, electronic device and storage medium
JP5639935B2 (en) Personal information providing system and personal information providing method
US12135767B1 (en)Systems and methods for ingesting credential information
CN113343216B (en)Issuer management method, issuer management device, storage medium and server
JP4764494B2 (en) Information linkage platform program

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication

Application publication date:20181127

RJ01Rejection of invention patent application after publication

[8]ページ先頭

©2009-2025 Movatter.jp