QRefreshableBearerOauthCraft class
A RefreshableBearerOauthCraft with ability of queueing requests using RequestQueueing.
- Inheritance
-
- Object
- BaseCraft
- OauthCraft
- BearerOauthCraft
- RefreshableBearerOauthCraft
- QRefreshableBearerOauthCraft
- Mixed in types
Constructors
-
QRefreshableBearerOauthCraft({required TokenPair tokens, required Future<
TokenPair> refreshTokenMethod(String), Client? client}) -
Creates new QRefreshableBearerOauthCraft instance with tokens,
a refresh token method, and a
client
.
Properties
- accessToken ↔ String
-
Token used for OAuth authentication.
getter/setter pairinherited
-
A value to be used as 'Authorization' header value.
no setterinherited
- client → Client
-
Underlying client used for making requests.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- locked → bool
-
Returns whether the lock is currently locked or not.
no setterinherited
- refreshToken ↔ String
-
A refreshToken used to obtain a new accessToken.
getter/setter pairinherited
-
requestInProcessStream
→ Stream<
Request> -
Stream on which the executing request is being streamed. Subscribing to
this stream allows for easier monitoring of which request is currently
being executed, e.g. for providing progress notifications.
no setterinherited
-
requestStreamController
→ StreamController<
Request> -
Getter visible for testing only.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → void -
Cancels the controller behind requestInProcessStream and calls the super
close method.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refreshTokens(
) → Future< void> -
A refreshToken used to obtain a new accessToken.
inherited
-
send<
T> (Request< T> request, {bool lock = true}) → Future<Response> -
If
lock
istrue
, therequest
is queued and is executed once all previous queued requests are completed. Iffalse
, the queueing is bypassed and therequest
is executed immediately.inherited -
serializeBody<
T> (T? body) → Object? -
Serializes
body
if it conforms to Serializable.inherited -
setTokens(
TokenPair tokens) → void -
Sets the accessToken and refreshToken to corresponding values from
tokens
.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited