, I almost completely no front-end development experience, from the HTML, JS, the most basic syntax to learn the edge of the development of the extension, when lazy did not timely knowledge, skills, including the development of the detour in the road to comb and record down. Now want to refactor, found a lot of things have to re-comb, so decided in this refactoring process, the Gmail API, Chrome extension, mail format, OAUTH2 certification and other r
/*OAuth Authorization Process:1. Login accountHttp://open.weibo.comSign up for developer information and become a SINA developer2, click "Mobile App", create an app (tick app name, application platform on it), page jump, display to "development stage can"3, back to the main page, click API Interface "Home" OAuth2.0 Authorization certificationFollow the instructions click to enter (1) oauth2/authorize get code (use GET request)Click to enter (2)
The client interacts with Weibo according to the following three major steps. 1) obtain authorization grant 2) use this grant to obtain access token 3) the consumer stores the token and uses it to access resources.
The client is a third-party application or consumer. Do not confuse it with end users. The final access token is not saved to the user cookie on the browser side, but saved to the client. Weibo can be understood as a service provider.
The consumer Authorization result is an authoriza
several pitfalls. Here we will repeat and complete it in Chinese:Install
First, you need to install it. The stable version of Laravel5 has not yet been released, but only the development version is provided. (an error occurs when installing it according to the document on github. This is because the provided version has not been released and you need to use the development version ), all installations are as follows:
"lucadegasperi/oauth2-server-lara
configure multiple resource services for the licensing service.Requests to get tokens (Tokens) are handled by the controller endpoint of spring MVC, and access to protected resources is handled through a standard spring security request filter.The endpoints listed below are the endpoints required by the Spring Security filter chain to implement the OAuth 2 authorization server:
The authorizationendpoint is used to authorize service requests. The default URL is:/oauth/authrize.
Toke
front of at least a lot less pit, sincerely, the baby will not say he pits. Last code.
Micro-trust Web page Authorization 2.0 public class Oauth2 {JavaScriptSerializer Jss = new JavaScriptSerializer (); Public Oauth2 () {}///
We need to call the time directly using the inside method, access to micro-letter Web page authorization, such as for a controller under the B view to obtain authorization, an
This article describes the PHP version of micro-letter third party to achieve a key login and access to user information methods. Share to everyone for your reference, specific as follows:
Note that the use of micro-letters in Third-party Web login is required "service number" can oh, so must go to the official application.
First you need to enter the micro-credit public platform to open the development model, and fill in the Oauth2 callback address
user's authorization.The client uses the acquired access token to access the protected resource that is stored on the service provider.1. OAuth2 Verification StepsStep One: Modify the configuration information for the config.properties. Open this file and fill in your information as follows:client_id = (you apply for the application of the Appkey)Client_sercret = (you apply for the application of the App_secret)Redirect_uri = (callback address, the s
HTTP//Since We want the protected resources to be accessible the UI as we we need// Session creation to is allowed (it's disabled by default in 2.0.6). Sessionmanagement (). Sessioncreationpolicy (Sessionc reationpolicy.if_required). and (). Requestmatchers (). Antmatchers ("/user/**"). and (). Auth Orizerequests (). Antmatchers ("/user/profile"). Access ("#oauth2. Hasscope (' read ') or(! #oauth2. Isoauth
For details, see Sina official documentsHttp://open.weibo.com/wiki/Oauth2/access_token Concrete ImplementationThe first step is to open the callback pageMacro Definition client_id#define KCLIENTID @ "XXX"Macro Definition Callback Address#define Kredirect_uri @"xxx"Macro Definition Client_secret#define Kclient_secret @ "XXX"1. Add WebViewUIWebView *webview = [[UIWebView alloc] initWithFrame:self.view.bounds];Webview.delegate = self;[Self.view Addsubvie
-authentication access to the OpenID section: * Temporary authentication code *//
Micro-Credit Certification section: The second step to obtain code string code = request["Code"]; if (string.
IsNullOrEmpty (code) {//If the code is not successful, pull again openaccess (); //micro-Credit Certification section: Step three get OpenID string url = string. Format ("https://api.weixin.qq.com/sns/oauth2/access_tOken?appid={0}amp;secret={1}amp;code={2}a
users:If you use node. js to implement the aforementioned Google API OAuth 2 access, the programming model is probably the same:
Do you know if you have access_token and have expired? If it does not exist or expires, step-by:
Jump the user page to Https://accounts.google.com/o/oauth2/auth (enclose a series of query parameters: Response_type/client_id/redirect_uri/scope, Append parameters as needed: access_type/approval_prompt/state ... )
We built the OAUTH2 authentication and authorization layer using Nginx's LUA middleware. If you have this intention, read the documentation below to automate and gain revenue.
SeatGeek has developed over the past few years, and we have accumulated a lot of different management interfaces for various tasks. We typically create new modules for new presentation requirements, such as our own blogs, charts, and more. We also regularly develop internal too
is the view mode. If you are using the developer model, you can create the public number menu (developer documentation) by submitting the following code to the micro-mail:
Copy Code code as follows:
{
"Button": [
{
"Type": "View",
"Name": "Login to micro-station",
"url": "https://open.weixin.qq.com/connect/oauth2/authorize?appid={in the background of the micro-trust public platform to get this appid}redirect_uri={ You fill in
come to Weibo login page , that is, _webview the first loaded URL
The address format is as follows:
https://api.weibo.com/oauth2/authorize?client_id=APPKEYresponse_type=coderedirect_uri=https:// Api.weibo.com/oauth2/default.html
Appkey is the only application ID that is automatically generated by the system when the application is created
Redirect_uri, must be consistent with the creation of the applic
separate process.1. Compiling the source codeAs in Part 2, we use Java SE 8, git, and gradle to access the source code and compile it:git clone https://github.com/callistaenterprise/blog-microservices.gitCD blog-microservicesgit checkout-b B3 M3.1./build-all.shIf the Windows platform is running, the corresponding bat file-build-all.bat is executed.On the basis of Part 2, 2 new component sources were added, OAuth Authorization server, project name Auth-server, and OAuth Resource server. The proj
: it can only start the engine and allow the car to travel for a limited distance, lock the car, but cannot open the trunk and cannot use other equipment in the vehicle. Here is a simple concept of "open authorization": With a parking key, the owner can delegate some of the car's use functions (such as starting the engine, driving a limited distance) to the waiter.Request Token URL: Obtain an unauthorized request token service address;User Authorization URL: Gets the request token service addres
Web application login steps (http://open.weibo.com/wiki/Oauth2 ):
1. register an application at http://open.weibo.com/and edit the application information --> "oauth2.0 authorization Settings" for "advanced information" and set the authorization callback page;
2. Modify the value of the yellow area and load it with webview;
"Https://api.weibo.com/oauth2/authorize? Client_id =Your_client_id Response_typ
The simplest way to automatically tweet Weibo is simply to call the Sina Weibo API (because it's just a simple tweet, there's no need to use its SDK). Reference development document Http://open.weibo.com/wiki/API for code writing
Create an App
To use the API of Weibo, you need to have an application first. Any application is OK, you can register a site application registration. The primary purpose of the registration application is to obtain My_appkey and My_access_token,
Get Access_token
The
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.