I. Background
Under the micro-service architecture, our system is broken down into a number of single service micro services based on business.
Each service has its own set of APIs to provide other service calls, so how to ensure security.
Not that you want to call can be invoked, must have a certification mechanism, is our internal services issued by the request before we can call our interface.
Need to pay attention to is that we are talking about micro-service calls between the security cert
I. Background
Under the microservices architecture, our systems are split into multiple, single-duty microservices based on business.
Each service has its own set of APIs to provide to other service calls, so how to ensure security.
It is not that you want to invoke the call, we must have the authentication mechanism, is the request from our internal service, we can call our interface.
Note that we are talking about the security authentication between microservices, not unified in the API certi
The Web API V2 user authentication template provides a popular application for user authentication scenarios such as. User name password admit using a local account (including creating users, setting up and changing passwords) and using third-party authentication methods, such as Facebook,google, etc. – the connection to an external account is included locally All of this is done by using a OAUTH2 authentication service.To make all that happen the tem
permission to authorize the scope (scope parameter) (after the service number obtains the advanced interface, the snsapi_base and snsapi_userinfo in the scope parameter are included by default), the publisher is guided to open the following page:
Https://open.weixin.qq.com/connect/oauth2/authorize? Appid = APPID redirect_uri = REDIRECT_URI response_type = code scope = SCOPE state = STATE # wechat_redirect, whether the permission of the scope para
dynamically bind the user's openid in the menu to obtain the user's openid through the user's click jump, or fill in the provided link in the navigation URL of the menu. two link types are officially provided.
One is the link where Scope is snsapi_base.
https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx520c15f417810387redirect_uri=https%3A%2F%2Fchong.qq.com%2Fphp%2Findex.php%3Fd%3D%26c%3DwxAdapter%26m%3DmobileDeal%26showwxpaytitle%3D1%26vb
This article mainly introduces the PHP implementation of the automatic Scan code login and registration function, combined with examples of PHP two-dimensional code recognition interface and related use skills, the need for friends can refer to the next
Development is now the programmer must master a basic technology, in fact, has been developed to know that the interface is very powerful to do it is very simple, here we look at an automatic login registration example.
PHP Scan Code PC-side Aut
"mobile phone", the application platform selected Android on the line, in fact, no impact. Then "create". Okay, now we're in a new interface, we're just testing it, so we don't have to review it unless you want your app to go live. Third, important information settings and recordsThis step is very important, directly related to the future can not be properly connected. left panel: "App info"--"Advanced info"See "OAuth2.0 Authorization Settings" and click "Edit". "Authorization callback page:" a
of their own name (the name of the late change will be very troublesome, please fill it once), such as "mobile phone control Raspberry Pi", the client selected "mobile phone", the application platform selected Android on the line, in fact, no impact. Then "create". Okay, now we're in a new interface, we're just testing it, so we don't have to review it unless you want your app to go live.Third, important information settings and recordsThis step is very important, directly related to the future
: Client and multiple services process: 1. User login successfully stored information in session 2.session stored in Redis or MySQL 3. When a client accesses a microservices, the server extracts user information from the storage Center (iv) Token-based (JWT) objects: Available for mobile applications and servers, browsers and servers, Services processes: 1. When the user logs in, the server generates tokens and signs them and sends them to clients 2. The client stores toke
Micro-Credit public number development custom menu
Please read this article before configuring the development
Please go to the Micro-trust platform Developer's documentation to read the interface description of "Web page authorization to get user basic information"
In the development of micro-credit public account, there is often a menu defined, then the user clicks on the menu to enter the user's personal center function, usually used in the various public accounts of member services.
How
Micro-letter scanning two-dimensional code login site is a micro-trust platform for the application of the Web site to implement a function of the interface. Micro-letter Open platform URL is https://open.weixin.qq.com
Preparatory work
Web application micro-letter login is based on the OAUTH2.0 protocol to build a micro-letter OAuth2.0 Authorization Login system.
In the micro-letter OAuth2. Before the OAuth2.0 authorized login access, register the
When landing some Web sites, you can choose to login for third-party landing, such as micro-blog landing, to Iqiyi art for example, into the home page, click "Login", will pop up the login box:In addition to this site landing, you can also choose other third-party landing, such as Weibo landing, QQ landing, landing and so on.After the choice of Weibo login, Iqiyi will apply to the user to authorize the use of Weibo login (when the user has landed on the micro-blog will directly apply for authori
QQ Internet: http://wiki.connect.qq.com/Open platform: https://open.weixin.qq.com/Weibo open platform: http://open.weibo.com/authentication/Sina Weibo platform cooperation login steps:
Place Weibo icons
Set up an authorization link on the interface: Https://api.weibo.com/oauth2/authorize?client_ Id=4087672060redirect_uri=http://www.putaoyun.com/wechatexe/getbackresponse_type=code
3. After the user clicks the authorization
{"Request": "/oauth2/access_token", "Error_code": 10021, "error": "HTTP METHOD is not suported for this request!"}, What exactly is the post to submit?
Is Sina's OAuth2 authorization, code I have obtained, this question has been troubled me for a long time ...
Reply to discussion (solution)
Post mode
Is your value is wrong, the/oauth2/access_token of your
authorize the scope (scope parameter) (after the service number obtains the advanced interface, the snsapi_base and snsapi_userinfo in the scope parameter are included by default), the publisher is guided to open the following page:Https://open.weixin.qq.com/connect/oauth2/authorize? Appid = APPID redirect_uri = REDIRECT_URI response_type = code scope = SCOPE state = STATE # wechat_redirect, whether the permission of the scope parameter is grante
Project
3. Add the corresponding consumer etting in Web. config to save the Client ID information obtained in step 1.
4. Create the MVC controller oauthcontroller and add the action named googlelogin to redirect to the Google page for logon. The Code is as follows:
Public class oauthcontroller: controller {public actionresult googlelogin () {var url = "https://accounts.google.com/o/oauth2/auth? "+" Scope = {0} State = {1} redirect_uri = {2} respo
the access_token and openid authorized on the webpage to obtain basic user information.
Directory [hide]
1 Step 1: The user agrees to the authorization and obtains the code
2 Step 2: Exchange code for webpage authorization access_token
3 Step 3: refresh access_token (if needed)
4. Step 4: Pull user information (the scope must be snsapi_userinfo)
5 Appendix: Check whether the authorization credential (access_token) is valid
Step 1: The user agre
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.