public static class GoogleAuthInterceptors
Factory 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 |
string OAuth2 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 |
ITokenAccess The 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 ITokenAccessWithHeaders
Parameter | |
---|---|
Name | Description |
credential |
ITokenAccessWithHeaders The credential to use to obtain access tokens. |
Returns | |
---|---|
Type | Description |
AsyncAuthInterceptor |
The interceptor. |