the user to go to the authorization page to agree to the authorization and obtain the code
Use code in exchange for webpage authorization access_token (different from access_token in Basic Support)
If necessary, developers can refresh the webpage to authorize access_token to avoid expiration.
Use the access_token and openid authorized on the webpage to obtain basic user information.
Directory [hide]
1 Step 1: The user agrees to
ArticleDirectory
Who owns or controls openid?
Why openid?
It's a single username and password that allows you to log in to any openid-enabled site.
It works on thousands of websites.
It's an open standard.
What is openid?
"
Openid allows you to use an
ArticleDirectory
Accelerate sign up process at your favorite websites
Reduce frustration associated with maintaining multiple usernames and passwords
Gain greater control over your online identity
Minimize password security risks
Openid is the fast, easy and secure way to sign in to websites. Here are justFewBenefits to using openid. Accelerate sign up process at your favorite websi
Obtain the user's OpenID through MVC development, and obtain the user's openid through mvc
The first development version of the web page, the most important to obtain the OpenId, is hereby recorded
1. First, you must have appid and appsecret.
1 1. public class WeiXin { 2 3 public static string appid { 4 get { 5 string _a
Example of a Applet -- Obtain the unique openid and openid of the Applet
1. Effect display
2. Key code
1) WXML File
Obtain the unique openid of a user.Openid: {openid} session_key: {session_key }}
2) JS files
Const APP_ID = ''; // enter the applet appidconst APP_SECRET = ''; // input the applet app_secretvar OPEN
The website is connected to the oauth function (automatically follows the public account). after logging on, I will get the openid of the login user and save it. I need to use openid to send a targeted message to the user. if the test fails to be debugged in the middle of the night, I find that the openid obtained through oauth and directly call the APi... the we
MVC web page authorization to obtain the user's OpenId, mvc to obtain the openid
I recently developed a public platform and made a record. I have also developed it before. I forgot about this development. After half a day, I 'd better take a note.
Note that the framework is used to develop a public platform for MVC. The scenario is to obtain the user's openid on
After paying attention to the public account, there will be a unique openid, and the output on the page will always exist. But why does the output display return_codefailreturn_msgJSAPI must be passed to the openid when you submit an order and click pay? I am in a hurry to help you .. There will be a unique openid after paying attention to the public account, and
The implementation method for the applet to obtain the user's openId, the applet openid
How to obtain the user's openId using a Applet
Front end:
Wx. login ({success: function (res) {res. code })
After obtaining the code, upload it to the background,
Then request the interface
Https://api.weixin.qq.com/sns/jscode2session? Appid = APPID secret = SECRET js_
Website access to the scan code login (oauth) function (automatically follow the public number), login I will get to login user OpenID, save it.
I need to use OpenID to send a directed message to the user to test the midnight unsuccessful
After debugging, it is found that the OpenID obtained by OAuth and the direct call API get attention to the user list of
$. Post (index. php? Actq open, {qnumber: qNumber}, functi $. post ('index. php? Act = q openid =
', {'Qnumber': qnumber}, function (data) {}, 'json'); is index. php the current page? Or the page that submits the JSON data?
Reply to discussion (solution)
Index. php should be the current pageBut for beginners, it is better not to use the current pageBecause ajax needs to process the returned data, especially the jsonIn this case, if the php p
GetCodeUrl method is as follows:
# Region re-obtains the Code jump link (only basic information can be obtained without user authorization )///Re-obtain the Code. in the future, Code will be taken back to the target page (only basic information (openid) can be obtained without user authorization ))///Target page///
Public static string GetCodeUrl (string url) {string CodeUrl = ""; // Encode the url = System. web. httpUtility. urlEncode (url); CodeUr
The example of this article for everyone to share the micro-trust public platform to achieve access to the user OpenID method for your reference, the specific contents are as follows
Index.aspx.cs Code:
Public partial class Index:System.Web.UI.Page {//user ID public string OpenID = "";
The public number information section is publicly string AppID = configurationmanager.appsettings["AppID"];
publ
domain name will be more troublesome, generally not necessary.
Put Redis in this cache.
Access to user information requires a Web page authorization, a Web page authorization with Silent Authorization (snsapi_base) and user-aware authorization (SNSAPI_USERINFO)You just have to use a silent authorization for OpenID.
Silent Authorization process:
Users open your page-"Jump to the authorization page-" Jump to the page you set up and get code-"accord
authorization server must support the HTTP GET and Post methods defined in RFC 2616 using the authorization endpoint. Customers can use the HTTP GET or POST method to send authorization requests to the authorization server. If you use the HTTP GET method, the serialization of the request parameter is serialized using a per-URI query string (section 13.1). If you use the HTTP POST method, request parameter serialization using Form serialization form (Section 13.2).
brings a call for simplified operations.
The efforts of plaxo and Google can demonstrate how to improve the ease of use of all openid to reduce user frustration. However, Eric Eldon of venturebeat thinks there are many things to do:
"The multi-site login claimed by those companies should have better integration and achieve login in one or zero clicks, which is a correct direction ."
Everyone will be the winner
The current situation is not for every
Html5 + jquery get openid
Recently, I was modifying a mobile mall. Because the wap end is HTML5 and the art template technology is widely used, the modification was not suitable at the beginning, and the implementation of HTML5 using openid has never been very good, after understanding and learning the acquisition principle, we finally implemented HTML to get openid
OpenID addresses cross-site authentication issues, and OAuth addresses cross-site licensing issues. Authentication and authorization are inseparable. The two sets of protocols for OpenID and OAuth come from two different organizations with similarities and overlaps, so it's difficult to integrate them. Fortunately, OpenID Connect, as the next version of
Next let's take a look at the public platform webpage to obtain the user's OpenID method. If you need to know about it, let's take a look. next let's take a look at the public platform webpage to obtain the user's OpenID method. If you need to know about it, let's take a look.
Script ec (2); script
After you click the custom menu view type button, the client will open the url value (that is, the webpage l
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.