public static class GoogleAuthInterceptors : objectFactory methods to create authorization interceptors for Google credentials. GoogleGrpcCredentials
Namespace
Grpc.AuthAssembly
Grpc.Auth.dll
Methods
FromAccessToken(String)
public static AsyncAuthInterceptor FromAccessToken(string accessToken)Creates an AsyncAuthInterceptor that will use given access token as authorization.
| Parameter | |
|---|---|
| Name | Description |
accessToken |
StringOAuth2 access token. |
| Returns | |
|---|---|
| Type | Description |
AsyncAuthInterceptor |
The interceptor. |
FromCredential(ITokenAccess)
public static AsyncAuthInterceptor FromCredential(ITokenAccess credential)Creates an AsyncAuthInterceptor that will obtain access token from any credential type that implements
ITokenAccess. (e.g. GoogleCredential).
| Parameter | |
|---|---|
| Name | Description |
credential |
ITokenAccessThe credential to use to obtain access tokens. |
| Returns | |
|---|---|
| Type | Description |
AsyncAuthInterceptor |
The interceptor. |
FromCredential(ITokenAccessWithHeaders)
public static AsyncAuthInterceptor FromCredential(ITokenAccessWithHeaders credential)Creates an AsyncAuthInterceptor that will obtain access token and associated information from any credential type that implements
| Parameter | |
|---|---|
| Name | Description |
credential |
ITokenAccessWithHeadersThe credential to use to obtain access tokens. |
| Returns | |
|---|---|
| Type | Description |
AsyncAuthInterceptor |
The interceptor. |