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

Side by Side Diff: pkg/appengine/lib/api/users.dart

Issue 804973002: Add appengine/gcloud/mustache dependencies. (Closed) Base URL: git@github.com:dart-lang/pub-dartlang-dart.git@master
Patch Set: Added AUTHORS/LICENSE/PATENTS files Created 6 years 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
« no previous file with comments | « pkg/appengine/lib/api/remote_api.dart ('k') | pkg/appengine/lib/appengine.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
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.
4
5 library appengine.api.users;
6
7 import 'dart:async';
8
9 import 'package:gcloud/service_scope.dart' as ss;
10
11 class User {
12 final String email;
13 final String id;
14 final String authDomain;
15 final bool isAdmin;
16
17 User({this.email, this.authDomain, this.id, this.isAdmin});
18
19 String toString() => email;
20 }
21
22 abstract class UserService {
23 User get currentUser;
24
25 Future<String> createLoginUrl(String destination);
26
27 Future<String> createLogoutUrl(String destination);
28 }
29
30 /**
31 * Register a new [UserService] object.
32 *
33 * Calling this outside of a service scope or calling it more than once inside
34 * the same service scope will result in an error.
35 *
36 * See the `package:gcloud/service_scope.dart` library for more information.
37 */
38 void registerUserService(UserService service) {
39 ss.register(#_appengine.users, service);
40 }
41
42 /**
43 * The user service.
44 *
45 * Request handlers will be run inside a service scope which contains the
46 * users service.
47 */
48 UserService get userService => ss.lookup(#_appengine.users);
OLDNEW
« no previous file with comments | « pkg/appengine/lib/api/remote_api.dart ('k') | pkg/appengine/lib/appengine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698