Package io.grpc.auth
Class ClientAuthInterceptor
java.lang.Object
io.grpc.auth.ClientAuthInterceptor
- All Implemented Interfaces:
io.grpc.ClientInterceptor
@Deprecated
public final class ClientAuthInterceptor
extends Object
implements io.grpc.ClientInterceptor
Deprecated.
Client interceptor that authenticates all calls by binding header data provided by a credential.
Typically this will populate the Authorization header but other headers may also be filled out.
Uses the new and simplified Google auth library: https://github.com/google/google-auth-library-java
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate io.grpc.Metadata
Deprecated.private final com.google.auth.Credentials
Deprecated.Deprecated. -
Constructor Summary
ConstructorsConstructorDescriptionClientAuthInterceptor
(com.google.auth.Credentials credentials, Executor executor) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptiongetRequestMetadata
(URI uri) Deprecated.<ReqT,
RespT>
io.grpc.ClientCall<ReqT, RespT> interceptCall
(io.grpc.MethodDescriptor<ReqT, RespT> method, io.grpc.CallOptions callOptions, io.grpc.Channel next) Deprecated.private URI
removePort
(URI uri) Deprecated.private URI
serviceUri
(io.grpc.Channel channel, io.grpc.MethodDescriptor<?, ?> method) Deprecated.Generate a JWT-specific service URI.private static final io.grpc.Metadata
Deprecated.
-
Field Details
-
credentials
private final com.google.auth.Credentials credentialsDeprecated. -
cached
private io.grpc.Metadata cachedDeprecated. -
lastMetadata
Deprecated.
-
-
Constructor Details
-
ClientAuthInterceptor
Deprecated.
-
-
Method Details
-
interceptCall
public <ReqT,RespT> io.grpc.ClientCall<ReqT,RespT> interceptCall(io.grpc.MethodDescriptor<ReqT, RespT> method, io.grpc.CallOptions callOptions, io.grpc.Channel next) Deprecated.- Specified by:
interceptCall
in interfaceio.grpc.ClientInterceptor
-
serviceUri
private URI serviceUri(io.grpc.Channel channel, io.grpc.MethodDescriptor<?, ?> method) throws io.grpc.StatusExceptionDeprecated.Generate a JWT-specific service URI. The URI is simply an identifier with enough information for a service to know that the JWT was intended for it. The URI will commonly be verified with a simple string equality check.- Throws:
io.grpc.StatusException
-
removePort
Deprecated.- Throws:
io.grpc.StatusException
-
getRequestMetadata
Deprecated.- Throws:
io.grpc.StatusException
-
toHeaders
Deprecated.
-
MoreCallCredentials.from(Credentials)
instead.