TokenOauthCraft class
OauthCraft that uses "Token accessToken" as Authorization header.
- Inheritance
-
- Object
- BaseCraft
- OauthCraft
- TokenOauthCraft
- Implementers
Constructors
- TokenOauthCraft({required String accessToken, Client? client})
-
Creates new instance of TokenOauthCraft with
accessToken
. Underlying client can be provided as well, if not, the default one is used.
Properties
- accessToken ↔ String
-
Token used for OAuth authentication.
getter/setter pairinherited
-
A value to be used as 'Authorization' header value.
no setteroverride
- client → Client
-
Underlying client used for making requests.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
-
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 -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited