You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// By default it will use a in memory storage [MemoryStorage].
33
+
/// For persisting the credentials implement a custom [OAuthStorage].
34
+
/// See [OAuthStorage] for more information.
35
+
OAuthStorage? storage,
36
+
}) : _storage = storage ??MemoryStorage();
37
+
22
38
/// OAuth authorization endpoint.
23
39
finalUri authorizationEndpoint;
24
40
@@ -32,22 +48,11 @@ class OAuthChopper {
32
48
finalString secret;
33
49
34
50
/// OAuth storage for storing credentials.
35
-
/// By default it will use a in memory storage. For persisting the credentials implement a custom [OAuthStorage].
51
+
/// By default it will use a in memory storage. For persisting the credentials
52
+
/// implement a custom [OAuthStorage].
36
53
/// See [OAuthStorage] for more information.
37
54
finalOAuthStorage _storage;
38
55
39
-
OAuthChopper({
40
-
requiredthis.authorizationEndpoint,
41
-
requiredthis.identifier,
42
-
requiredthis.secret,
43
-
this.endSessionEndpoint,
44
-
45
-
/// OAuth storage for storing credentials.
46
-
/// By default it will use a in memory storage [MemoryStorage]. For persisting the credentials implement a custom [OAuthStorage].
47
-
/// See [OAuthStorage] for more information.
48
-
OAuthStorage? storage,
49
-
}) : _storage = storage ??MemoryStorage();
50
-
51
56
/// Get stored [OAuthToken].
52
57
Future<OAuthToken?> get token async {
53
58
final credentialsJson =await _storage.fetchCredentials();
@@ -57,18 +62,21 @@ class OAuthChopper {
57
62
}
58
63
59
64
/// Provides an [OAuthAuthenticator] instance.
60
-
/// The authenticator can throw exceptions when OAuth authentication fails. If [onError] is provided exceptions will be passed to [onError] and not be thrown.
65
+
/// The authenticator can throw exceptions when OAuth authentication fails.
66
+
/// If [onError] is provided exceptions will be passed to [onError] and not be
67
+
/// thrown.
61
68
OAuthAuthenticatorauthenticator({
62
-
/// When provided [onError] handles exceptions if thrown.
0 commit comments