File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
import 'dart:async' ;
2
2
3
- import 'package:oauth2/oauth2.dart' ;
3
+ import 'package:oauth2/oauth2.dart' as oauth2 ;
4
4
import 'package:oauth_chopper/src/oauth_authenticator.dart' ;
5
5
import 'package:oauth_chopper/src/oauth_grant.dart' ;
6
6
import 'package:oauth_chopper/src/oauth_interceptor.dart' ;
@@ -73,13 +73,13 @@ class OAuthChopper {
73
73
Future <OAuthToken ?> refresh () async {
74
74
final credentialsJson = await _storage.fetchCredentials ();
75
75
if (credentialsJson == null ) return null ;
76
- final credentials = Credentials .fromJson (credentialsJson);
76
+ final credentials = oauth2. Credentials .fromJson (credentialsJson);
77
77
try {
78
78
final newCredentials =
79
79
await credentials.refresh (identifier: identifier, secret: secret);
80
80
await _storage.saveCredentials (newCredentials.toJson ());
81
81
return OAuthToken .fromCredentials (newCredentials);
82
- } on AuthorizationException {
82
+ } on oauth2. AuthorizationException {
83
83
_storage.clear ();
84
84
rethrow ;
85
85
}
@@ -89,7 +89,7 @@ class OAuthChopper {
89
89
/// Currently supported grants:
90
90
/// - [ResourceOwnerPasswordGrant]
91
91
/// - [ClientCredentialsGrant]
92
- ///
92
+ /// - [AuthorizationCodeGrant]
93
93
/// Throws an exception if the grant fails.
94
94
Future <OAuthToken > requestGrant (OAuthGrant grant) async {
95
95
final credentials =
You can’t perform that action at this time.
0 commit comments