OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 pub_dartlang_org.upload_signer_service; | 5 library pub_dartlang_org.upload_signer_service; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:convert'; | 8 import 'dart:convert'; |
9 | 9 |
10 import 'package:crypto/crypto.dart'; | 10 import 'package:crypto/crypto.dart'; |
11 import 'package:googleapis_auth/src/crypto/rsa_sign.dart'; | 11 import 'package:googleapis_auth/src/crypto/rsa_sign.dart'; |
12 import 'package:googleapis_auth/src/crypto/pem.dart' as pem; | 12 import 'package:googleapis_auth/src/crypto/pem.dart' as pem; |
13 import 'package:googleapis_auth/src/crypto/rsa.dart' as rsa; | 13 import 'package:googleapis_auth/src/crypto/rsa.dart' as rsa; |
14 | 14 |
15 import 'package:gcloud/db.dart'; | 15 import 'package:gcloud/db.dart'; |
16 import 'package:gcloud/service_scope.dart' as ss; | 16 import 'package:gcloud/service_scope.dart' as ss; |
17 import 'package:pubserver/repository.dart'; | 17 import 'package:pub_server/repository.dart'; |
18 | 18 |
19 import 'models.dart'; | 19 import 'models.dart'; |
20 | 20 |
21 /// The registered [UploadSignerService] object. | 21 /// The registered [UploadSignerService] object. |
22 UploadSignerService get uploadSigner => ss.lookup(#_url_signer); | 22 UploadSignerService get uploadSigner => ss.lookup(#_url_signer); |
23 | 23 |
24 /// Register a new [UploadSignerService] object into the current service | 24 /// Register a new [UploadSignerService] object into the current service |
25 /// scope. | 25 /// scope. |
26 void registerUploadSigner(UploadSignerService uploadSigner) | 26 void registerUploadSigner(UploadSignerService uploadSigner) |
27 => ss.register(#_url_signer, uploadSigner); | 27 => ss.register(#_url_signer, uploadSigner); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 'Expires' : expirationString, | 92 'Expires' : expirationString, |
93 'GoogleAccessId' : serviceAccountEmail, | 93 'GoogleAccessId' : serviceAccountEmail, |
94 'policy' : policyString, | 94 'policy' : policyString, |
95 'signature' : signatureString, | 95 'signature' : signatureString, |
96 'success_action_redirect' : successRedirectUrl, | 96 'success_action_redirect' : successRedirectUrl, |
97 }; | 97 }; |
98 | 98 |
99 return new AsyncUploadInfo(UploadUrl, fields); | 99 return new AsyncUploadInfo(UploadUrl, fields); |
100 } | 100 } |
101 } | 101 } |
OLD | NEW |