OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // TODO(courage): documentation. |
4 | 5 |
5 // TODO(courage): documentation. | 6 // Use the <code>chrome.identity</code> API to get OAuth2 access tokens. |
6 namespace identity { | 7 namespace identity { |
7 | 8 |
8 dictionary TokenDetails { | 9 dictionary TokenDetails { |
9 // Fetching a token may require the user to sign-in to Chrome, or | 10 // Fetching a token may require the user to sign-in to Chrome, or |
10 // approve the application's requested scopes. If the interactive | 11 // approve the application's requested scopes. If the interactive |
11 // flag is <code>true</code>, <code>getAuthToken</code> will | 12 // flag is <code>true</code>, <code>getAuthToken</code> will |
12 // prompt the user as necessary. When the flag is | 13 // prompt the user as necessary. When the flag is |
13 // <code>false</code> or ommitted, <code>getAuthToken</code> will | 14 // <code>false</code> or ommitted, <code>getAuthToken</code> will |
14 // return failure any time a prompt would be required. | 15 // return failure any time a prompt would be required. |
15 boolean? interactive; | 16 boolean? interactive; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // window will close, and the final redirect URL will be passed to | 82 // window will close, and the final redirect URL will be passed to |
82 // the <var>callback</var> function. | 83 // the <var>callback</var> function. |
83 // | 84 // |
84 // |details| : WebAuth flow options. | 85 // |details| : WebAuth flow options. |
85 // |callback| : Called with the URL redirected back to your application. | 86 // |callback| : Called with the URL redirected back to your application. |
86 static void launchWebAuthFlow(WebAuthFlowDetails details, | 87 static void launchWebAuthFlow(WebAuthFlowDetails details, |
87 LaunchWebAuthFlowCallback callback); | 88 LaunchWebAuthFlowCallback callback); |
88 } | 89 } |
89 ; | 90 ; |
90 }; | 91 }; |
OLD | NEW |