{"id":102,"date":"2018-03-10T15:04:16","date_gmt":"2018-03-10T07:04:16","guid":{"rendered":"http:\/\/www.max-shu.com\/blog\/?p=102"},"modified":"2018-03-10T15:04:16","modified_gmt":"2018-03-10T07:04:16","slug":"google-oauth-openid-%e7%bb%99%e7%ac%ac%e4%b8%89%e6%96%b9%e6%8e%88%e6%9d%83","status":"publish","type":"post","link":"http:\/\/www.max-shu.com\/blog\/?p=102","title":{"rendered":"Google OAUTH + OpenID \u7ed9\u7b2c\u4e09\u65b9\u6388\u6743"},"content":{"rendered":"<p>&nbsp;<\/p>\n<div>OPENID\u64cd\u4f5c\u8fc7\u7a0b\uff1a<\/div>\n<div>\u5047\u5982\u81ea\u5df1\u6709\u7f51\u7ad9www.hanborq.com\uff0c\u60f3\u8981google\u7684\u7528\u6237\u4e5f\u80fd\u767b\u5f55\uff0c\u5219\u8981\u505a\u5982\u4e0b\u64cd\u4f5c\uff1a<\/div>\n<div>1. \u628a\u81ea\u5df1\u7684\u7f51\u7ad9\u6ce8\u518c\u5230google\uff1ahttps:\/\/www.google.com\/accounts\/ManageDomains<\/div>\n<div>2. \u5728google\u4e0a\u7ba1\u7406\u81ea\u5df1\u7684\u7f51\u7ad9\uff1a<a href=\"https:\/\/www.google.com\/accounts\/ManageDomains\">https:\/\/www.google.com\/accounts\/ManageDomains<\/a>\u00a0\uff0c\u5176\u4e2dTarget URL path prefix:\u8868\u793a\u7684\u662f\u9274\u6743\u5b8c\u6210\u540e\u5c06\u4f1a\u8fd4\u56de\u7684\u5730\u5740\u53catoken\u3002<\/div>\n<div>3. \u6d4b\u8bd5\uff1a\u70b9\u51fb\u6d4b\u8bd5\u65f6\u5c06\u4f1a\u8df3\u8f6c\u5230\u8fd9\u4e2a\u5730\u5740\u7ee7\u7eed\u6267\u884c\uff1ahttp:\/\/www.hanborq.com\/authsub?token=1%2FK_dvV72aicVeZ6FUSK0s6TLbfayj0t4srgoOyG4BeWA<\/div>\n<div><\/div>\n<div>OAUTH2\u64cd\u4f5c\u8fc7\u7a0b\uff1a<\/div>\n<div>\u6587\u6863\uff1ahttp:\/\/code.google.com\/intl\/zh-CN\/apis\/accounts\/docs\/OAuth2.html \uff08\u542bweb javascript\u8bbf\u95ee\u65b9\u5f0f\u3001web\u670d\u52a1\u5668\u8bbf\u95ee\u65b9\u5f0f\uff0c\u5e94\u7528\u7a0b\u5e8f\u8bbf\u95ee\u65b9\u5f0f\uff0c\u4e0b\u9762\u7f6e\u8bf4\u660e\u4e86web\u65b9\u5f0f\u8fc7\u7a0b\uff09\uff1a<\/div>\n<div>1. \u6ce8\u518c\u5230google\uff1a<a href=\"https:\/\/code.google.com\/apis\/console\">https:\/\/code.google.com\/apis\/console<\/a>\uff0c\u9009\u62e9API Access\uff0c\u9700\u8981\u7ffb\u5899\u3002<\/div>\n<div><\/div>\n<table>\n<colgroup>\n<col \/>\n<col \/><\/colgroup>\n<tbody>\n<tr>\n<td>\n<div>Client ID:<\/div>\n<\/td>\n<td>\n<div>133501856298.apps.googleusercontent.com<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<div>Client secret:<\/div>\n<\/td>\n<td>\n<div>X-rMJocMGJ3DDNbMgS-iFO9X<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<div>Redirect URIs:<\/div>\n<\/td>\n<td>\n<div>http:\/\/www.hanborq.com\/oauth2callback<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<div>JavaScript origins:<\/div>\n<\/td>\n<td>\n<div>http:\/\/www.hanborq.com<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div><\/div>\n<div>2. \u6388\u6743\u8bbf\u95ee\u65b9\u6cd5\uff08\u6ce8\uff1aclient_id\u548credirect_uri\u8ddf\u4e0a\u9762\u6ce8\u518c\u7684\u5bf9\u5e94\uff0cscope\u5bf9\u5e94\u67d0\u79cdAPI\uff0c\u9700\u8981\u770b\u6587\u6863\uff09\uff1a<\/div>\n<div><a href=\"https:\/\/accounts.google.com\/o\/oauth2\/auth?client_id=133501856298.apps.googleusercontent.com&amp;redirect_uri=http:\/\/www.hanborq.com\/oauth2callback&amp;scope=https:\/\/www.google.com\/m8\/feeds\/&amp;response_type=token\">https:\/\/accounts.google.com\/o\/oauth2\/auth?client_id=133501856298.apps.googleusercontent.com&amp;redirect_uri=http:\/\/www.hanborq.com\/oauth2callback&amp;scope=https:\/\/www.google.com\/m8\/feeds\/&amp;response_type=token<\/a><\/div>\n<div>3. \u767b\u5f55\u540c\u610f\u4e4b\u540e\u8fd4\u56de\u7ed3\u679c\uff1a<\/div>\n<div><a href=\"http:\/\/www.hanborq.com\/oauth2callback#access_token=1\/OfzgA-aTO0E39MIXx0WXq9TljTfd7-6lQeHhITVKskk&amp;expires_in=3600\">http:\/\/www.hanborq.com\/oauth2callback#access_token=1\/OfzgA-aTO0E39MIXx0WXq9TljTfd7-6lQeHhITVKskk&amp;expires_in=3600<\/a><\/div>\n<div>\u6ce8\u610f\u5230\u8fd4\u56de\u4e86access_token\u548c\u8d85\u65f6\u503c\u3002<\/div>\n<div>4. \u6700\u540e\u4f7f\u7528\u8fd9\u4e2a\u8fd4\u56de\u7684token\uff1a<\/div>\n<div><a href=\"https:\/\/www.google.com\/m8\/feeds\/contacts\/default\/full?oauth_token=1\/QbIbRMWW\">https:\/\/www.google.com\/m8\/feeds\/contacts\/default\/full?oauth_token=1\/OfzgA-aTO0E39MIXx0WXq9TljTfd7-6lQeHhITVKskk<\/a><\/div>\n<div>\u8fd9\u91cc\u524d\u7f00\u4e3a\u7b2c\u4e00\u6b21\u8bf7\u6c42\u91cc\u9762\u7684scope\uff0c\u540e\u9762\u5e26\u4e86oauth_token\u4e3a\u4e0a\u9762\u7684access_token\u3002<\/div>\n<div><\/div>\n<div>\u5982\u679c\u8981\u5f97\u5230\u7528\u6237\u540d\u3001\u90ae\u7bb1\u5730\u5740\uff0c\u5219\u4f7f\u7528\u4e0b\u9762\u94fe\u63a5\uff0c\u8fd4\u56de\u7684XML\u5305\u542b&lt;id&gt;\u4e3a\u90ae\u7bb1\uff0c&lt;title&gt;\u91cc\u9762\u542b\u6709\u7528\u6237\u540d\uff1a<\/div>\n<div><a href=\"https:\/\/www.google.com\/m8\/feeds\/contacts\/default\/thin?oauth_token=1\/kX440CrtSTHg6imATBUMbXTQi2LrxLlo1tPS7D39s4g&amp;max-results=0\">https:\/\/www.google.com\/m8\/feeds\/contacts\/default\/thin?oauth_token=1\/kX440CrtSTHg6imATBUMbXTQi2LrxLlo1tPS7D39s4g&amp;max-results=0<\/a><\/div>\n<div><\/div>\n<div><\/div>\n<div>scope\u5217\u8868\uff1a<\/div>\n<div><\/div>\n<table>\n<colgroup>\n<col \/>\n<col \/><\/colgroup>\n<tbody>\n<tr>\n<td>\n<div>Google API<\/div>\n<\/td>\n<td>\n<div>Service name<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<div>Google Analytics Data API<\/div>\n<\/td>\n<td>\n<div>https:\/\/www.google.com\/analytics\/feeds\/<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<div>Google Base Data API<\/div>\n<\/td>\n<td>\n<div>http:\/\/www.google.com\/base\/feeds\/<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<div>Google Sites Data API<\/div>\n<\/td>\n<td>\n<div>http(s):\/\/sites.google.com\/feeds\/<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<div>Blogger Data API<\/div>\n<\/td>\n<td>\n<div>http:\/\/www.blogger.com\/feeds\/<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<div>Book Search Data API<\/div>\n<\/td>\n<td>\n<div>http:\/\/www.google.com\/books\/feeds\/<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<div>Calendar Data API<\/div>\n<\/td>\n<td>\n<div>http(s):\/\/www.google.com\/calendar\/feeds\/<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<div>Contacts Data API<\/div>\n<\/td>\n<td>\n<div>http(s):\/\/www.google.com\/m8\/feeds\/<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<div>Documents List Data API<\/div>\n<\/td>\n<td>\n<div>http(s):\/\/docs.google.com\/feeds\/<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<div>Finance Data API<\/div>\n<\/td>\n<td>\n<div>http:\/\/finance.google.com\/finance\/feeds\/<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<div>Gmail Atom feed<\/div>\n<\/td>\n<td>\n<div>https:\/\/mail.google.com\/mail\/feed\/atom\/<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<div>Health Data API<\/div>\n<\/td>\n<td>\n<div>https:\/\/www.google.com\/health\/feeds\/<\/div>\n<div>https:\/\/www.google.com\/h9\/feeds\/ (H9 sandbox)<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<div>Maps Data API<\/div>\n<\/td>\n<td>\n<div>http:\/\/maps.google.com\/maps\/feeds\/<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<div>Picasa Web Albums Data API<\/div>\n<\/td>\n<td>\n<div>http:\/\/picasaweb.google.com\/data\/<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<div>Sidewiki Data API<\/div>\n<\/td>\n<td>\n<div>http:\/\/www.google.com\/sidewiki\/feeds\/<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<div>Spreadsheets Data API<\/div>\n<\/td>\n<td>\n<div>http(s):\/\/spreadsheets.google.com\/feeds\/<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<div>Webmaster Tools API<\/div>\n<\/td>\n<td>\n<div>http:\/\/www.google.com\/webmasters\/tools\/feeds\/<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<div>YouTube Data API<\/div>\n<\/td>\n<td>\n<div><a href=\"http:\/\/gdata.youtube.com\/\">http:\/\/gdata.youtube.com<\/a><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div><\/div>\n<div>\u5f97\u5230gtalk\u7528\u6237\u540d\u3001\u5934\u50cf \u00a0 \u00a0 \u00a0 \u00a0 \u00a0www-opensocial.googleusercontent.com\/api\/people\/@me \uff08http\u5934\u91cc\u9762\u5fc5\u987b\u5305\u542bAuthorization: OAuth &lt;token&gt;\uff0coauth_token\u5c31\u4e0d\u7528\u4e86\uff09<\/div>\n<div><\/div>\n<div><\/div>\n<h2>Google OAUTH + OpenID \u7ed9\u7b2c\u4e09\u65b9\u6388\u6743<\/h2>\n<div><\/div>\n<div>\u53ef\u4ee5\u901a\u8fc7Google OAuth\u670d\u52a1\u4e3aGoogle \u7528\u6237\u7684\u8d44\u6e90\u8fdb\u884c\u6388\u6743\uff0c\u5982\u7528\u6237\u901a\u8fc7\u7b2c\u4e09\u65b9\u8f6f\u4ef6\u8c03\u7528Google Open API\u64cd\u4f5c\u7528\u6237\u7684\u8d44\u6e90\u65f6\uff0c\u5c31\u9700\u8981\u7528\u6237\u5bf9\u7b2c\u4e09\u65b9\u8f6f\u4ef6\u6388\u6743\uff1b\u901a\u8fc7Google OpenID\u670d\u52a1\u53ef\u4ee5\u6253\u901aGoogle\u4e0e\u5176\u4ed6\u652f\u6301OpenID\u670d\u52a1\u7f51\u7ad9\u4e4b\u95f4\u7684\u7528\u6237\u4f53\u7cfb\u3002\u73b0\u5728\u5047\u5982\u6709\u53e6\u5916\u4e00\u4e2a\u7f51\u7ad9\uff0c\u4e5f\u60f3\u5f00\u653e\u81ea\u5df1\u7684Open API\u670d\u52a1\uff0c\u4f46\u662f\u53c8\u4e0d\u60f3\u5b9e\u73b0OAuth\u670d\u52a1\uff08\u6bd5\u7adf\u5b9e\u73b0OAUTH\u670d\u52a1\u8fd8\u662f\u9700\u8981\u4e00\u4e9b\u6210\u672c\u7684\uff09\uff0c\u90a3\u8be5\u600e\u4e48\u529e\uff1f\u5b83\u53ef\u4e0d\u53ef\u4ee5\u4f7f\u7528Google\u63d0\u4f9b\u7684OAuth\u670d \u52a1\uff0c\u6388\u6743\u8ba4\u8bc1\u4ea4\u7ed9Google\u6765\u5904\u7406\uff1f\u53ef\u4ee5\uff01\u4f46\u662fOAuth\u6388\u6743\u4e5f\u662f\u57fa\u4e8e\u7528\u6237\u767b\u5f55\u6765\u5b9e\u73b0\u7684\uff0cGoogle OAuth\u7528\u6237\u4f53\u7cfb\u53ea\u662fGoogle\u7684\u7528\u6237\u4f53\u7cfb\uff0c\u90a3\u53c8\u600e\u4e48\u529e\u4e86\uff1fOpenID\uff01\u5bf9\uff0c\u5c06\u7f51\u7ad9\u7684\u7528\u6237\u4f53\u7cfb\u4e0eGoogle\u7528\u6237\u4f53\u7cfb\u6253\u901a\uff0c\u5e76\u4e14\u4f7f\u7528Google OAuth\u670d\u52a1\u6765\u5b9e\u73b0\u6388\u6743\uff0c\u5373Google\u63d0\u51fa\u7684OpenID + OAUTH\u7684\u89e3\u51b3\u65b9\u6848\u3002<\/div>\n<div><\/div>\n<div>\u4e00\u3001 OAUTH \u4e0e OpenID<\/div>\n<div>\u524d\u9762\u4e24\u7bc7\u6587\u7ae0\u5bf9 OAuth \u4e0e\u00a0OpenID \u5747\u505a\u8fc7\u4ecb\u7ecd\uff0c\u4e14Google\u5747\u63d0\u4f9b\u4e86\u8fd9\u4e24\u79cd\u670d\u52a1\uff0c\u5728\u6b64\u6211\u4eec\u5148\u7b80\u8981\u7684\u56de\u987e\u8fd9\u4e24\u79cd\u670d\u52a1\uff0c\u5177\u4f53\u4ecb\u7ecd\u8bf7\u53c2\u89c1\u76f8\u5173\u6587\u7ae0\u3002<\/div>\n<div>OAUTH\u662f\u4e00\u79cd\u5f00\u653e\u7684\uff0c\u57fa\u4e8e\u7528\u6237\u767b\u5f55\u7684\u6388\u6743\u8ba4\u8bc1\u65b9\u5f0f\u3002\u5982\u5f53\u7528\u6237\u4f7f\u7528\u7b2c\u4e09\u65b9\u8f6f\u4ef6\u8c03\u7528Google Open API\u53bb\u64cd\u4f5c\u81ea\u5df1\u7684Google\u670d\u52a1\u8d44\u6e90\u65f6\uff0c\u7528\u6237\u5c31\u8981\u5148\u5bf9\u8be5\u8f6f\u4ef6\u6388\u6743\u3002\u6388\u6743\u8fc7\u7a0b\u4e2d\uff0c\u7b2c\u4e09\u65b9\u8f6f\u4ef6\u4f1a\u5f15\u5bfc\u7528\u6237\u767b\u5f55Google\uff0c\u8fdb\u884c\u7528\u6237\u9274\u6743\uff0c\u7528\u6237\u901a\u8fc7 Google\u8eab\u4efd\u9274\u6743\u540e\u624d\u80fd\u5bf9\u7b2c\u4e09\u65b9\u8f6f\u4ef6\u6388\u6743\u3002\u663e\u7136\uff0cGoogle OAUTH\u53ea\u80fd\u5bf9Google\u7528\u6237\u8fdb\u884c\u9274\u6743\uff0c\u5176\u4ed6\u7528\u6237\u4f53\u7cfb\u7684\u7528\u6237\u4e0d\u80fd\u76f4\u63a5\u9274\u6743\u3002<\/div>\n<div>OpenID\u662f\u4e00\u79cd\u5f00\u653e\u7684\uff0c\u53bb\u7528\u6237\u4e2d\u5fc3\u7684\uff0c\u7528\u4e8e\u6253\u901a\u5404\u7f51\u7ad9\u4e4b\u95f4\u7684\u7528\u6237\u4f53\u7cfb\u7684\u670d\u52a1\u3002\u5728\u652f\u6301OpenID\u7684\u7f51\u7ad9\u95f4\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u4efb\u4f55\u4e00\u4e2a\u7f51\u7ad9\u7684\u5e10\u53f7\u6216\u8005 Open ID\u53bb\u767b\u5f55\u4efb\u4f55\u4e00\u4e2a\u7f51\u7ad9\u3002OpenID\u63d0\u4f9b\u4e86\u7c7b\u4f3c\u5355\u70b9\u767b\u5f55\u7684\u7528\u6237\u4f53\u9a8c\uff0c\u5e76\u4e14\u7528\u6237\u65e0\u9700\u5728\u5404\u4e2a\u7f51\u7ad9\u4e0a\u6ce8\u518c\u5c31\u53ef\u4ee5\u4f7f\u7528\u8be5\u7f51\u7ad9\u7684\u8d44\u6e90\uff0c\u5c06\u7528\u6237\u4ece\u7e41\u91cd\u7684\u5e10\u53f7\u6ce8\u518c\u4e0e\u7ba1 \u7406\u5de5\u4f5c\u4e2d\u89e3\u8131\u51fa\u6765\u3002\u5f53\u7528\u6237\u4f7f\u7528OpenID\u767b\u5f55\u6ca1\u6ce8\u518c\u7684\u7f51\u7ad9\u8fc7\u7a0b\u4e2d\uff0c\u7f51\u7ad9\u4f1a\u5f15\u5bfc\u7528\u6237\u767b\u5f55OP\uff08\u7528\u6237OpenID\u6ce8\u518c\u7684\u7f51\u7ad9\uff09\uff0c\u8bf7\u6c42OP\u5bf9\u7528\u6237\u8eab\u4efd\u9274\u6743\uff0c\u7528 \u6237\u901a\u8fc7OP\u9274\u6743\uff0c\u7f51\u7ad9\u624d\u4f1a\u5bb9\u8bb8\u7528\u6237\u767b\u5f55\u3002<\/div>\n<div>\u82e5\u5c06OpenID\u4e0eGoogle OAUTH\u7ed3\u5408\uff0cOpenID\u5c06\u7b2c\u4e09\u65b9\u7f51\u7ad9\u7684\u7528\u6237\u4f53\u7cfb\u4e0eGoogle\u7528\u6237\u4f53\u7cfb\u6253\u901a\u540e\uff0c\u7b2c\u4e09\u65b9\u7f51\u7ad9\u4fbf\u53ef\u4f7f\u7528Google OAUTH\u670d\u52a1\uff0c\u5bf9\u81ea\u5df1\u7684\u7528\u6237\u8fdb\u884c\u6388\u6743\uff01\u4ea4\u4e92\u793a\u610f\u56fe\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/div>\n<div><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-103\" src=\"http:\/\/www.max-shu.com\/blog\/wp-content\/uploads\/2018\/03\/Image-2.jpg\" alt=\"\" width=\"551\" height=\"319\" \/><\/div>\n<div><\/div>\n<div>\u4e8c\u3001 Google OAUTH + OpenID\u89e3\u51b3\u65b9\u6848<\/div>\n<div>Google\u63d0\u51fa\u4e86OpenID + OAUTH\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u5c06\u4e24\u8005\u63c9\u5408\u5728\u4e00\u8d77\uff0c\u5177\u4f53\u6d41\u7a0b\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/div>\n<div><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-104\" src=\"http:\/\/www.max-shu.com\/blog\/wp-content\/uploads\/2018\/03\/Image-3.jpg\" alt=\"\" width=\"640\" height=\"327\" \/><\/div>\n<div>1. Web\u5e94\u7528\u8bf7\u6c42\u7528\u6237\u767b\u5f55\uff1b<\/div>\n<div>2. \u7528\u6237\u9009\u62e9\u4f7f\u7528Google OpenID\u8fdb\u884c\u767b\u5f55\uff1b<\/div>\n<div>3. Web\u5e94\u7528\u8bf7\u6c42\u53d1\u73b0Google\u8ba4\u8bc1\u670d\u52a1URL\uff1b<\/div>\n<div>4. Google\u5411Web\u5e94\u7528\u8fd4\u56deXRDS\u4fe1\u606f\uff0c\u5176\u4e2d\u5305\u542bGoogle\u8ba4\u8bc1\u670d\u52a1URL\uff1b<\/div>\n<div>5. Web\u5e94\u7528\u8bf7\u6c42\u7528\u6237\u767b\u5f55Google\u670d\u52a1\uff0c\u901a\u8fc7\u8bf7\u6c42\u7528\u6237\u6388\u6743\uff1b<\/div>\n<div>6. Google\u5f15\u5bfc\u7528\u6237\u767b\u5f55\uff1b<\/div>\n<div>7. \u7528\u6237\u8f93\u5165\u7528\u6237\u540d\u5bc6\u7801\u8fdb\u884c\u767b\u5f55\uff0c\u540c\u65f6\u786e\u8ba4\u662f\u5426\u5bf9\u7b2c\u4e09\u65b9\u8f6f\u4ef6\u6388\u6743\uff1b<\/div>\n<div>8. Google\u8ba4\u8bc1\u4e2d\u5fc3\u8fd4\u56de\u7528\u6237ID\u4e0e\u6388\u6743\u7684Request Token\u7ed9Web\u5e94\u7528\uff1b<\/div>\n<div>9. \u7528\u6237\u53ef\u4ee5\u8bbf\u95ee\u53d7\u4fdd\u62a4\u7684\u8d44\u6e90\uff0c\u540c\u65f6\u53ef\u4ee5\u7ee7\u7eed\u7b2c\u4e03\u90e8\u4e2dOauth\u8ba4\u8bc1\u4f59\u4e0b\u7684\u73af\u8282\uff1b<\/div>\n<div>\u4ece\u4e0a\u9762\u7684\u6d41\u7a0b\u7b2c\u4e94\u6b65\u53ef\u4ee5\u770b\u51fa\uff0cGoogle\u89e3\u51b3\u65b9\u6848\u4e2d\uff0c\u5c06OAUTH\u4e0eOpenID\u7684\u767b\u5f55\u64cd\u4f5c\u5408\u5e76\u5728\u4e00\u8d77\u3001\u5e76\u4e14\u5728\u767b\u5f55\u7684\u540c\u65f6\u5411Google\u53d1\u9001 Oauth\u8bf7\u6c42\uff0c\u8bf7\u6c42\u7528\u6237\u6388\u6743\u3002\u8fd9\u6837\u4e00\u6765\uff0c\u5728\u7b2c\u4e94\u6b65\u4e2d\uff0c\u7528\u6237\u767b\u5f55Google\uff08OpenID\u4e2dGoogle\u5bf9\u7528\u6237\u9274\u6743\uff09\uff0c\u540c\u65f6\u8bf7\u6c42\u5bf9\u7528\u6237\u6388\u6743\uff08OAUTH \u4e2d\u5bf9\u7528\u6237\u6388\u6743\uff0c\u540c\u65f6\u65e0\u9700\u518d\u6b21\u767b\u9646\uff0c\u56e0\u4e3a\u524d\u9762OpenID\u5df2\u7ecf\u767b\u5f55\u8fc7\u4e86\uff09\u3002<\/div>\n<div>\u4e09\u3001Google OAUTH+OpenID Demo<\/div>\n<div>Google\u63d0\u4f9b\u4e86OAUTH + OpenID\u7684DEMO\uff0cDemo\u6f14\u793a\u5730\u5740\u5982\u4e0b\uff1a<a href=\"http:\/\/googlecodesamples.com\/hybrid\/\">http:\/\/googlecodesamples.com\/hybrid\/<\/a><\/div>\n<div>\u521a\u5f00\u59cb\uff0c\u7528\u6237\u65e2\u6ca1OpenID\u767b\u5f55\u4e5f\u6ca1OAUTH\u6388\u6743\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/div>\n<div><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-105\" src=\"http:\/\/www.max-shu.com\/blog\/wp-content\/uploads\/2018\/03\/Image-4.jpg\" alt=\"\" width=\"560\" height=\"280\" \/><\/div>\n<div>\u63a5\u7740\uff0c\u70b9\u51fb\u4e0a\u56fe\u4e2dlogin\u6309\u94ae\u8bf7\u6c42\u4ee5Google\u63d0\u4f9b\u7684OpenID\u767b\u5f55\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/div>\n<div><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-106\" src=\"http:\/\/www.max-shu.com\/blog\/wp-content\/uploads\/2018\/03\/Image-5.jpg\" alt=\"\" width=\"549\" height=\"238\" \/><\/div>\n<div>\u8f93\u5165\u7528\u6237\u540d\u4e0e\u5bc6\u7801\u767b\u5f55\u540e\uff0cGoogle\u63d0\u9192\u60a8\u5373\u5c06\u767b\u9646\u5230\u5916\u90e8\u7f51\u7ad9\uff0c\u5916\u90e8\u7f51\u7ad9\u7533\u8bf7\u5bf9\u60a8\u7684\u8d44\u6e90\u8fdb\u884c\u6388\u6743\uff0c\u60a8\u662f\u5426\u540c\u610f\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/div>\n<div><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-107\" src=\"http:\/\/www.max-shu.com\/blog\/wp-content\/uploads\/2018\/03\/Image-6.jpg\" alt=\"\" width=\"379\" height=\"279\" \/><\/div>\n<div>\u70b9\u51fb\u7ee7\u7eed\u767b\u5f55\u540e\uff0c\u767b\u5f55\u6210\u529f\uff0c\u5e76\u4e14\u8fd4\u56de\u6388\u6743\u7684Token\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/div>\n<div><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-108\" src=\"http:\/\/www.max-shu.com\/blog\/wp-content\/uploads\/2018\/03\/Image-7.jpg\" alt=\"\" width=\"576\" height=\"286\" \/><\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; OPENID\u64cd\u4f5c\u8fc7\u7a0b\uff1a \u5047\u5982\u81ea\u5df1\u6709\u7f51\u7ad9www.hanborq.com\uff0c\u60f3\u8981google\u7684\u7528\u6237\u4e5f\u80fd &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[76,72,77,75],"class_list":["post-102","post","type-post","status-publish","format-standard","hentry","category-4","tag-google","tag-oauth","tag-openid","tag-75"],"views":1928,"_links":{"self":[{"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=102"}],"version-history":[{"count":2,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/102\/revisions"}],"predecessor-version":[{"id":924,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/102\/revisions\/924"}],"wp:attachment":[{"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=102"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}