This article to share the content is about ThinkPHP5 in the use of Auth2 to verify the process analysis, the need for friends can refer to, hope to help everyone.
Auth2 verified on TP, found few notes on the Internet, not like yii, so write notes here to help friends with relevant needs
PS: Since Oauth2 has four kinds of scenarios, this example is based on client credential implementation, the other three kinds of will not tell
First, through the com
the token.(E) The client uses a token to request a resource from the resource server.(F) The resource server confirms that the token is correct and agrees to open the resource to the client
For more detailed information, refer to: http://www.ruanyifeng.com/blog/2014/05/oauth_2_0.html
Package Oauth2
Package Oauth2 provides support for making OAuth2 authorized an
URL is not blacklisted, it will appear at the top.
Then, the domain name configuration is successful.
2. User authorization and access to code
Under the domain name root directory, create a new file, named Oauth2.php, whose contents are
Find out how the request authorization page is structured first:
Https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPIDredirect_uri=REDIRECT_
authentication has OAuth2.0 and basic Auth (only for the application of the developer Debugging Interface), the new version of the interface to support only these two ways. OAuth2.0 is simpler and more secure than 1.0 for the entire authorization verification process, and is the most important way to authenticate and authorize users in the future.About the OAUTH2.0 protocol authorization process to view the OAuth2.0 authorization process, where the client refers to the Third-party application,
-----------------------------------------------------------------------------------------------First, your website entry must be a service number (activate authentication and have the permission to obtain the user's openid; the subscription number cannot be used ).The oau2authentication link on the webpage. Then access the website through the service number menu link, such as: https://open.weixin.qq.com/connect/oauth2/authorize? Appid = YOURAPPID re
are some examples in the development SDK that can be used as a reference. I downloaded the Java version of the weibo4j, after downloading, import development tools. Such as: The code is more, don't panic, first find examples package under the Oauth2 package under the Oauth4code class. We need to run this class. This class completes the OAuth operation, which includes two requests First time:https://api.weibo.com/
goods and so on. Of course, the next open platform to open the payment interface, then similar to the pocket-like software developers, can be large, small and medium-sized enterprises to provide micro-credit services and software.
The public platform is the management development backstage of the service number subscription number.
Development platform to say that the popular point is to implement the contents of the mobile phone inside the software to share a key friend circle;
The followin
Because of the recent exposure to a project that calls Sina Weibo's open interface, you want to try Python invoke the microblogging API.
SDK Download Address: Http://open.weibo.com/wiki/SDK code is not more than more than 10 k, can be read completely.
With a Twitter account, you can create a new app and then get the app key and app secret, which is necessary for the app to get OAuth2.0 authorization.
Learn OAuth2 can view links to Sina Weibo's inst
1. Configure the authorization callback page domain nameAfter entering the public platform backstage, go to the Developer Center-permissions table, find the Web page authorization to get the user basic information, click Modify, configure authorization callback page domain name.Note:The authorization callback domain name configuration specification is the whole domain name and does not have the HTTP, for example needs the webpage authorizes the domain name to be: www.qq.com, configures after thi
Use the payment interface in the mall to get the user address, mall
To give a man to fish is better than to teach
Pay to get the user address
Using the Get address information is used in conjunction with the payment application, the payment application is approved and the function is available.
Mall, the use of payment to obtain the user's delivery address, you can omit the user input address information complex process, improve the user experience.
But it may be because of the user's privacy,
Use payment interface to get user address in Mall
To give a man to fish is better than to teach
Pay to get the user address
Using the Get address information is used in conjunction with the payment application, the payment application is approved and the function is available.
Mall, the use of payment to obtain the user's delivery address, you can omit the user input address information complex process, improve the user experience.
But it may be because of the user's privacy, so in the process
OAuth2.0 IntroductionAbout its introduction, give the following two articles, believe that after reading, it should have a certain degree of understanding:[1] Understanding OAuth 2.0--Ruan Yi Feng[2] help you understand the OAuth2.0 protocol in depth--seccloudHere I mainly describe the use of OAuth2.0 in Laravel5. About this agreement itself, as well as the operation of the process I hope you read the above two articles, understanding, and then look at the back of my content!installing OAuth2.0
Using a micro-letter to obtain address information is a micro-letter payment with the application, micro-credit payment application through, you can use this function.
Micro-Credit Mall, the use of micro-letter payment to obtain the user's receiving address, you can omit the user input address information cumbersome process, improve user experience.
But may be because of the user's privacy, so in the use of the process, users need to choose their own active use of this function, and is through
PHP micro-Scan Code PC-side automatic landing register with the interface scope is snsapi_userinfo, micro-letter landing is a Web page authorization landing, and the other is a micro-letter joint landing
Web page Authorization Login: http://mp.weixin.qq.com/wiki/17/c0f37d5704f0b64713d5d2c37b468d75.html
Micro-letter joint landing: Https://open.weixin.qq.com/cgi-bin/frame?t=home/web_tmpllang=zh_CN
First: The micro-letter link with a logo to generate a two-dimensional code
For example, the link is
to obtain basic user information. This interface, including other interfaces, is required for the user (that is, OpenID) to follow the public number before the call succeeds.
Since the scope has two modes, the following is a separate explanation:
Scope is snsapi_base so the user must be concerned about the public number to get information
Build your own two files: index.php and getuserinfo.php
Code instance
index.php as follows:
Scope=snsapi_base instance $appid= ' your AppID '; $redirect _uri
Laravel5.1 + OAuth2PasswordGrant (password authorization mode)
Background description
This article is intended to build a general application backend service environment. account verification is one of the basic environments for applications.
Oau22. it provides a secure authentication environment. access_token is used as the token for accessing secure resources. as a single interaction between the application end and the backend, the password type is simpler, if you want to implement a third-
Magento Micro-Scan code website automatic Login
The case modeled on the micro-letter joint landing approach, micro-letter joint Landing Introduction:
https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_listt=resource/res_listverify=1lang= Zh_cn
After viewing the authorization interface Call (Unionid), it is not difficult to find out the callback address, the user confirmed the landing PC can jump
Get Unionid method
Public Function wcallbackaction () {$code = $_get[' code '];$state =
Keyword: Python3 Oauth2 Sina Weibo
This interface is based on the Weibo Python SDK modified by Liu Xuefeng, its SDK is recommended by Sina, the original author is written by Python2
With some modifications, the Weibo SDK based on Python3 is available here
#!/usr/bin/env python #-*-coding:utf-8-*-__version__ = ' 1.04 ' __author__ = ' Liao Xuefeng (askxuefeng@gmail.com) ' __p
ublish__ = ' http://www.cnblogs.com/txw1958/' ' Python3 client SDK for Sina
Tags: associate ret OpenID PEN logs RMI API details listThe OAuth2 and OIDC (OpenId Connect) are described in the previous 5 blogs, and their role is authorization and authentication. So when we get OAuth2 's access token or OIDC's ID token, how does our resource service validate that tokens have permission to perform an operation on a resource? For example, I have a api,/books, which has the following 5 op
This article describes the PHP implementation of micro-scan code automatic landing and registration function. Share to everyone for your reference, specific as follows:
Micro-credit development is now a programmer must master a basic technology, in fact, have done micro-letter development are aware of the micro-letter interface is very powerful to do it is also very simple, here we look at a micro-letter automatic Landing Registration example.
PHP micro-Scan Code PC-side automatic landing regi
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.