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

Side by Side Diff: pkg/oauth2/lib/src/authorization_code_grant.dart

Issue 12295014: Remove deprecated Strings class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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/http/lib/src/utils.dart ('k') | pkg/oauth2/lib/src/credentials.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library authorization_code_grant; 5 library authorization_code_grant;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:uri'; 8 import 'dart:uri';
9 9
10 // TODO(nweiz): This should be a "package:" import. See issue 6745. 10 // TODO(nweiz): This should be a "package:" import. See issue 6745.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 this._redirectEndpoint = redirect; 132 this._redirectEndpoint = redirect;
133 this._scopes = scopes; 133 this._scopes = scopes;
134 this._stateString = state; 134 this._stateString = state;
135 var parameters = { 135 var parameters = {
136 "response_type": "code", 136 "response_type": "code",
137 "client_id": this.identifier, 137 "client_id": this.identifier,
138 "redirect_uri": redirect.toString() 138 "redirect_uri": redirect.toString()
139 }; 139 };
140 140
141 if (state != null) parameters['state'] = state; 141 if (state != null) parameters['state'] = state;
142 if (!scopes.isEmpty) parameters['scope'] = Strings.join(scopes, ' '); 142 if (!scopes.isEmpty) parameters['scope'] = scopes.join(' ');
143 143
144 return addQueryParameters(this.authorizationEndpoint, parameters); 144 return addQueryParameters(this.authorizationEndpoint, parameters);
145 } 145 }
146 146
147 /// Processes the query parameters added to a redirect from the authorization 147 /// Processes the query parameters added to a redirect from the authorization
148 /// server. Note that this "response" is not an HTTP response, but rather the 148 /// server. Note that this "response" is not an HTTP response, but rather the
149 /// data passed to a server controlled by the client as query parameters on 149 /// data passed to a server controlled by the client as query parameters on
150 /// the redirect URL. 150 /// the redirect URL.
151 /// 151 ///
152 /// It is a [StateError] to call this more than once, to call it before 152 /// It is a [StateError] to call this more than once, to call it before
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 /// Closes the grant and frees its resources. 250 /// Closes the grant and frees its resources.
251 /// 251 ///
252 /// This will close the underlying HTTP client, which is shared by the 252 /// This will close the underlying HTTP client, which is shared by the
253 /// [Client] created by this grant, so it's not safe to close the grant and 253 /// [Client] created by this grant, so it's not safe to close the grant and
254 /// continue using the client. 254 /// continue using the client.
255 void close() { 255 void close() {
256 if (_httpClient != null) _httpClient.close(); 256 if (_httpClient != null) _httpClient.close();
257 _httpClient = null; 257 _httpClient = null;
258 } 258 }
259 } 259 }
OLDNEW
« no previous file with comments | « pkg/http/lib/src/utils.dart ('k') | pkg/oauth2/lib/src/credentials.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698