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

Side by Side Diff: pkg/oauth2/README.md

Issue 269053003: Mark oauth2 as running outside of dart:io contexts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/oauth2/CHANGELOG.md ('k') | pkg/oauth2/pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 A client library for authenticating with a remote service via OAuth2 on 1 A client library for authenticating with a remote service via OAuth2 on
2 behalf of a user, and making authorized HTTP requests with the user's OAuth2 2 behalf of a user, and making authorized HTTP requests with the user's OAuth2
3 credentials. Currently this only works where `dart:io` is available. 3 credentials.
4 4
5 OAuth2 allows a client (the program using this library) to access and 5 OAuth2 allows a client (the program using this library) to access and
6 manipulate a resource that's owned by a resource owner (the end user) and 6 manipulate a resource that's owned by a resource owner (the end user) and
7 lives on a remote server. The client directs the resource owner to an 7 lives on a remote server. The client directs the resource owner to an
8 authorization server (usually but not always the same as the server that 8 authorization server (usually but not always the same as the server that
9 hosts the resource), where the resource owner tells the authorization server 9 hosts the resource), where the resource owner tells the authorization server
10 to give the client an access token. This token serves as proof that the 10 to give the client an access token. This token serves as proof that the
11 client has permission to access resources on behalf of the resource owner. 11 client has permission to access resources on behalf of the resource owner.
12 12
13 OAuth2 provides several different methods for the client to obtain 13 OAuth2 provides several different methods for the client to obtain
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // Once we're done with the client, save the credentials file. This 91 // Once we're done with the client, save the credentials file. This
92 // ensures that if the credentials were automatically refreshed 92 // ensures that if the credentials were automatically refreshed
93 // while using the client, the new credentials are available for the 93 // while using the client, the new credentials are available for the
94 // next run of the program. 94 // next run of the program.
95 return credentialsFile.open(FileMode.WRITE).then((file) { 95 return credentialsFile.open(FileMode.WRITE).then((file) {
96 return file.writeString(client.credentials.toJson()); 96 return file.writeString(client.credentials.toJson());
97 }).then((file) => file.close()).then((_) => result); 97 }).then((file) => file.close()).then((_) => result);
98 }); 98 });
99 }).then(print); 99 }).then(print);
100 ``` 100 ```
OLDNEW
« no previous file with comments | « pkg/oauth2/CHANGELOG.md ('k') | pkg/oauth2/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698