| OLD | NEW |
| 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 oauth2.utils; | |
| 6 | |
| 7 import 'dart:convert'; | 5 import 'dart:convert'; |
| 8 | 6 |
| 9 import 'package:http/http.dart' as http; | 7 import 'package:http/http.dart' as http; |
| 10 import 'package:pub/src/utils.dart'; | 8 import 'package:pub/src/utils.dart'; |
| 11 import 'package:scheduled_test/scheduled_process.dart'; | 9 import 'package:scheduled_test/scheduled_process.dart'; |
| 12 import 'package:scheduled_test/scheduled_test.dart'; | 10 import 'package:scheduled_test/scheduled_test.dart'; |
| 13 import 'package:scheduled_test/scheduled_server.dart'; | 11 import 'package:scheduled_test/scheduled_server.dart'; |
| 14 import 'package:shelf/shelf.dart' as shelf; | 12 import 'package:shelf/shelf.dart' as shelf; |
| 15 | 13 |
| 16 | 14 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 44 expect(body, matches(new RegExp(r'(^|&)code=access\+code(&|$)'))); | 42 expect(body, matches(new RegExp(r'(^|&)code=access\+code(&|$)'))); |
| 45 | 43 |
| 46 return new shelf.Response.ok(JSON.encode({ | 44 return new shelf.Response.ok(JSON.encode({ |
| 47 "access_token": accessToken, | 45 "access_token": accessToken, |
| 48 "token_type": "bearer" | 46 "token_type": "bearer" |
| 49 }), headers: {'content-type': 'application/json'}); | 47 }), headers: {'content-type': 'application/json'}); |
| 50 }); | 48 }); |
| 51 }); | 49 }); |
| 52 } | 50 } |
| 53 | 51 |
| OLD | NEW |