Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Unified Diff: chrome/common/extensions/docs/tut_oauth.html

Issue 9968064: Documenting permissions for OAuth tutorial (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/docs/static/tut_oauth.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/tut_oauth.html
===================================================================
--- chrome/common/extensions/docs/tut_oauth.html (revision 132824)
+++ chrome/common/extensions/docs/tut_oauth.html (working copy)
@@ -132,6 +132,7 @@
<ul>
<li><a href="a11y.html">Accessibility</a></li>
<li><a href="background_pages.html">Background Pages</a></li>
+ <li><a href="transient_background_pages.html">Event Pages</a></li>
<li><a href="content_scripts.html">Content Scripts</a></li>
<li><a href="xhr.html">Cross-Origin XHR</a></li>
<li><a href="i18n.html">Internationalization</a></li>
@@ -286,6 +287,21 @@
'app_name': 'My Google Docs Extension'
});
</pre>
+<p>
+To use the OAuth library,
+you must declare the "tabs" permision in the
+<a href="http://code.google.com/chrome/extensions/manifest.html">extension manifest</a>.
+You must also declare the sites you are using
+including the request URL, the authorize URL, access URL,
+and, if necessary, the scope URL.
+For example:
+</p>
+<pre>"permissions": [ "tabs", "https://docs.google.com/feeds/*",
+ "https://www.google.com/accounts/OAuthGetRequestToken",
+ "https://www.google.com/accounts/OAuthAuthorizeToken",
+ "https://www.google.com/accounts/OAuthGetAccessToken"
+]
+</pre>
<h3 id="request-token">Fetching and authorizing a request token</h3>
<p>
Once you have your background page set up, call the <code>authorize()</code> function to begin the OAuth dance and redirect the user to the OAuth provider. The client library abstracts most of this process, so all you need to do is pass a callback to the <code>authorize()</code> function, and a new tab will open and redirect the user.
« no previous file with comments | « chrome/common/extensions/docs/static/tut_oauth.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698