RefreshableTokenOauthCraft class

TokenOauthCraft with ability to refresh accessToken using refreshTokens method from Refreshable.

Inheritance
Mixed in types
Implementers

Constructors

RefreshableTokenOauthCraft({required TokenPair tokens, required Future<TokenPair> refreshTokenMethod(String), Client? client})
Creates new instance of RefreshableTokenOauthCraft with tokens pair and a refreshTokenMethod. An underlying client can also be provided.

Properties

accessToken String
Token used for OAuth authentication.
getter/setter pairinherited
authorizationHeaderValue String
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
refreshToken String
A refreshToken used to obtain a new accessToken.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → void
Closes the underlying client.
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) Future<Response>
Adds authorization header to the request headers.
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