OauthManager class
Interceptor which handles fetching an oauth access token and adding them to gRPC requests.
Config defining client_id and client_secret must be added at oauth_config.yaml, or this interceptor will do nothing. See oauth_config.example.yaml for a template.
Constructors
- OauthManager.new({Dio? dio})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
interceptStreaming<
Q, R> (ClientMethod< Q, R> method, Stream<Q> requests, CallOptions options, ClientStreamingInvoker<Q, R> invoker) → ResponseStream<R> - Passes streaming requests without modification.
-
interceptUnary<
Q, R> (ClientMethod< Q, R> method, Q request, CallOptions options, ClientUnaryInvoker<Q, R> invoker) → ResponseFuture<R> - Adds the access token to the gRPC call's metadata if the token is present.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited