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
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

Parameter
Name Description
credential ITokenAccessWithHeaders

The credential to use to obtain access tokens.

Returns
Type Description
AsyncAuthInterceptor

The interceptor.