Class GoogleAuthInterceptors
Factory methods to create authorization interceptors for Google credentials. GoogleGrpcCredentials
Inheritance
System.Object
GoogleAuthInterceptors
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Grpc.Auth
Assembly: Grpc.Auth.dll
Syntax
public static class GoogleAuthInterceptors
Methods
FromAccessToken(String)
Creates an AsyncAuthInterceptor that will use given access token as authorization.
Declaration
public static AsyncAuthInterceptor FromAccessToken(string accessToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | accessToken | OAuth2 access token. |
Returns
Type | Description |
---|---|
AsyncAuthInterceptor | The interceptor. |
FromCredential(ITokenAccess)
Creates an AsyncAuthInterceptor that will obtain access token from any credential type that implements
ITokenAccess
. (e.g. GoogleCredential
).
Declaration
public static AsyncAuthInterceptor FromCredential(ITokenAccess credential)
Parameters
Type | Name | Description |
---|---|---|
ITokenAccess | credential | The credential to use to obtain access tokens. |
Returns
Type | Description |
---|---|
AsyncAuthInterceptor | The interceptor. |
FromCredential(ITokenAccessWithHeaders)
Creates an AsyncAuthInterceptor that will obtain access token and associated information
from any credential type that implements
Declaration
public static AsyncAuthInterceptor FromCredential(ITokenAccessWithHeaders credential)
Parameters
Type | Name | Description |
---|---|---|
ITokenAccessWithHeaders | credential | The credential to use to obtain access tokens. |
Returns
Type | Description |
---|---|
AsyncAuthInterceptor | The interceptor. |