diff options
author | 2016-10-30 23:49:39 -0700 | |
---|---|---|
committer | 2016-10-30 23:49:39 -0700 | |
commit | 43944082daf3e8f63328ba7c18685b0df3cf212a (patch) | |
tree | f91d8de96683179e39a90f654339968cb7b6dff1 /src/csharp/Grpc.Auth | |
parent | ea3b568b8fef498f6aeec4349702c588afe709da (diff) | |
parent | 1c55919ece40ec0cf7baa280c55273ab7fbea83f (diff) |
Merge remote-tracking branch 'upstream/master' into core-end2end-tests-cronet-update
Diffstat (limited to 'src/csharp/Grpc.Auth')
-rw-r--r-- | src/csharp/Grpc.Auth/GoogleAuthInterceptors.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/csharp/Grpc.Auth/GoogleAuthInterceptors.cs b/src/csharp/Grpc.Auth/GoogleAuthInterceptors.cs index 96d6ee87ae..c5bca444b4 100644 --- a/src/csharp/Grpc.Auth/GoogleAuthInterceptors.cs +++ b/src/csharp/Grpc.Auth/GoogleAuthInterceptors.cs @@ -33,6 +33,7 @@ using System; using System.Threading; +using System.Threading.Tasks; using Google.Apis.Auth.OAuth2; using Grpc.Core; @@ -72,9 +73,10 @@ namespace Grpc.Auth public static AsyncAuthInterceptor FromAccessToken(string accessToken) { GrpcPreconditions.CheckNotNull(accessToken); - return new AsyncAuthInterceptor(async (context, metadata) => + return new AsyncAuthInterceptor((context, metadata) => { metadata.Add(CreateBearerTokenHeader(accessToken)); + return TaskUtils.CompletedTask; }); } |