Class GoogleAuthInterceptors (2.48.0)

public static class GoogleAuthInterceptors : object

Factory methods to create authorization interceptors for Google credentials. GoogleGrpcCredentials

Inheritance

Object > GoogleAuthInterceptors

Namespace

Grpc.Auth

Assembly

Grpc.Auth.dll

Methods

FromAccessToken(String)

public static AsyncAuthInterceptor FromAccessToken(string accessToken)

Creates an AsyncAuthInterceptor that will use given access token as authorization.

Parameter
NameDescription
accessTokenString

OAuth2 access token.

Returns
TypeDescription
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
NameDescription
credentialITokenAccess

The credential to use to obtain access tokens.

Returns
TypeDescription
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
NameDescription
credentialITokenAccessWithHeaders

The credential to use to obtain access tokens.

Returns
TypeDescription
AsyncAuthInterceptor

The interceptor.