Oauth2.0 error code
In the implementation of Sina Weibo oauth2.0, the authorization server will check the request header and Request Parameters in accordance with the oauth2.0 protocol when receiving the authentication request. If the request is illegal or the verification fails, the authorization server returns an error message, which includes the following parameters:
Error: Error Code
Error_code: Error internal number
Error_description: Error description
Error_url: a readable webpage URI
1 Preface1.1backgroundfront end for mobile APP applications, using https+restful protocol over the Internet with back-end API server cluster for communication, interface authentication based on OAuth2 agreement. The simple architecture diagram is as follows:650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/40/05/wKioL1PN-g2yMOsOAACsRDJCncE280.png "title=" 123456.PNG "alt=" Wkiol1pn-g2ymosoaacsrdjcnce280.png "/>1.2Pain PointAlthough API the in
#-*-coding:cp936-*-#python 2.7.10#Xiaodeng#Sina Weibo uses OAuth2.0 call API#The call of the Weibo open interface needs to obtain the user's identity authentication. At present, the user authentication of Weibo open platform mainly uses OAuth2.0. #There are 2 ways to invoke API interfaces using OAuth2.0:1, using parameters directly, passing parameters named Access_tokenurl='HTTPS://API.WEIBO.COM/2/STATUSES/PUBLIC_TIMELINE.JSON?ACCESS_TOKEN=ABCD'2, passed in the header, in the form of adding auth
);
/*+ -------------------------------------------------Example 1: enable Weibo certificationAfter authentication is enabled, a window will be opened in the browser. the url contains the code parameter.Note: when running one of the examples, you must comment out another example.+ -------------------------------------------------*/Weibo. authorize ();
/*+ --------------------------------------------------Example 2: access_token is required.(1) Read the Weibo open platform APISuch as: http://open
Public Account-get user information (webpage authorization) implementation steps develop official documents according to the public account:
To obtain user information, follow these steps:
1 Step 1: the user agrees to the authorization and obtains the code2 Step 2: exchange code for webpage authorization access_token3 Step 3: Refresh access_token (if needed)4. Step 4: pull user information (the scope must be snsapi_userinfo)
1 Get code
To ensure that the public account has the permission to au
This article mainly introduces the development of nodejs public account payment, which has some reference value. if you are interested, you can refer to the development of the odeJs public account function, the mobile terminal H5 page calls the payment function. In the past few days, we have used the payment function called by node and h5 pages to meet the company's needs. Now we repeat the development process to help more developers smoothly complete the development of the payment function. (No
information: http://mp.weixin.qq.com/wiki/17/c0f37d5704f0b64713d5d2c37b468d75.html * Step 1: use url jump to get code * Step 2: use code to get openid and access_token **/public void GetOpenidAndAccessToken (string code) {if (! String. isNullOrEmpty (code) {// Obtain the code to obtain the openid and access_token Log. debug (this. getType (). toString (), "Get code:" + code); GetOpenidAndAccessTokenFromCode (code);} else {// Construct the URL string host = context for webpage authorization to o
minutes. a code can only be successfully exchanged for one access_token, which means it is invalid. The temporary and one-time authorization code ensures the security of authorized logon. Third parties can use the https and state parameters to further enhance the security of their authorized logon.
In this way, the client only needs:
WXEntryActivity.loginWeixin(MainActivity.this, GeneralAppliction.sApi);
5. get the authorization password access_token through code
We obtained the code in the o
I was always curious about this function and finally made it available yesterday. Record it here. The official introduction has always been curious about this function, and it was finally available yesterday. Record it here. Official Introduction
Before OAuth2. for OAuth2.0 authorized login access, register a developer account on the open platform and have a http://www.php.cn/php/php-shenhe.html "target =" _ blank "> approved Web applications, obtain
middleware to. ///
A
that specifies options for the middleware. ///
A reference to this instance after the operation has completed.
public static IApplicationBuilder UseWeChatAuthentication(this IApplicationBuilder app, WeChatOptions options) { if (app == null) { throw new ArgumentNullException(nameof(app)); } if (options == null) { throw new ArgumentNullException(nameof(options)); } return app.UseMiddleware
(Options.Create(options)); } }}
We
1, configure the authorization callback page domain name, such as
Www.aaa.com
2. Third party Web page of The Sims, fn_system.php
PHP Code
if (emptyempty($_session[' user ']) ){
Header ("location:http://www.aaa.com/uc/fn_wx_login.php");
}Else{
Print_r ($_session[' user ']);
}
?>
3, when visiting the third party webpage, if there is no session information in the check session, jump to the landing page, fn_wx_login.php
PHP Code
Some promotional pages published by public accounts use webpage authorization to prohibit access outside the browser. what should I do if I want to obtain the source code of these pages? I used the Google plug-in UserAgentSwitcher to disguise the browser, but still prompted to visit the client... some promotional pages published by public accounts use webpage authorization to prohibit access outside the browser. what should I do if I want to obtain the source code of these pages?
I used Google p
construct a menu. to facilitate the simultaneous explanation of the next section, the menu structure is as follows:
{"Button": [{"type": "click", "name": "graphic acquisition", "key": "graphic" },{ "type ": "view", "name": "Get authorization", "url": "https://open.weixin.qq.com/connect/oauth2/authorize? Appid = wx0738856156f7323c redirect_uri = http://israel.sinaapp.com/oauth2/response_type=codescope=snsa
Laravel5.3 started using Passport as an API authorization, passport is based on OAuth2, The following article mainly introduces you to the use of passport in Laravel5.5 to achieve Auth authentication method, the text through the sample code introduced in very detailed, the need for friends can refer to, let's take a look at it.
Objective
Recently in writing a front-end separation project, originally wanted to use Jwt-auth + Dingo development, but sli
This article mainly introduces the use of passport in the Laravel5.5 to achieve AUTH certification, has a certain reference value, now share to everyone, the need for friends can refer to
Laravel5.3 started using Passport as an API authorization, passport is based on OAuth2, The following article mainly introduces you to the use of passport in Laravel5.5 to achieve Auth authentication method, the text through the sample code introduced in very detail
First, in the public platform-the Developer Center: Web page Licensing access to basic user information: Click "Modify", configure the page callback domain name
Second, the user authorized to obtain code
Required Resources:
$appid = ' ***************** ';$appsecret = ' ************************* ';
Note: Redirect_url is a callback link address for post-authorization redirection, please use UrlEncode to process the link.
Add the configured $url = ' https://open.weixin.qq.com/connect/
This article mainly introduces the PHP version of the automatic acquisition address API usage, combined with instance form analysis of PHP API interface call and use skills, the need for friends can refer to the following
Public platform is now more and more powerful, we can through a variety of API interface to get the corresponding data from the platform, the following is a PHP implementation of the automatic Acquisition Address API program, as follows.
The description of the interface I do n
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.