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

Unified Diff: pkg/oauth2/lib/src/expiration_exception.dart

Issue 11420025: Add a package for authenticating via OAuth2. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Refresh token fixes and code review changes Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/oauth2/lib/src/credentials.dart ('k') | pkg/oauth2/lib/src/handle_access_token_response.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/oauth2/lib/src/expiration_exception.dart
diff --git a/pkg/oauth2/lib/src/expiration_exception.dart b/pkg/oauth2/lib/src/expiration_exception.dart
new file mode 100644
index 0000000000000000000000000000000000000000..ac15559c31355b709eecdceea1fafd3bab464b90
--- /dev/null
+++ b/pkg/oauth2/lib/src/expiration_exception.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library expiration_exception;
+
+import 'dart:io';
+
+/// An exception raised when attempting to use expired OAuth2 credentials.
+class ExpirationException implements Exception {
+ /// The expired credentials.
+ final Credentials credentials;
+
+ /// Creates an ExpirationException.
+ ExpirationException(this.credentials);
+
+ /// Provides a string description of the ExpirationException.
+ String toString() =>
+ "OAuth2 credentials have expired and can't be refreshed.";
+}
« no previous file with comments | « pkg/oauth2/lib/src/credentials.dart ('k') | pkg/oauth2/lib/src/handle_access_token_response.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698