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 java.lang.Object implements io.grpc.ClientInterceptor
Deprecated.useMoreCallCredentials.from(Credentials)
instead.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
Fields Modifier and Type Field Description private io.grpc.Metadata
cached
Deprecated.private com.google.auth.Credentials
credentials
Deprecated.private java.util.Map<java.lang.String,java.util.List<java.lang.String>>
lastMetadata
Deprecated.
-
Constructor Summary
Constructors Constructor Description ClientAuthInterceptor(com.google.auth.Credentials credentials, java.util.concurrent.Executor executor)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private java.util.Map<java.lang.String,java.util.List<java.lang.String>>
getRequestMetadata(java.net.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 java.net.URI
removePort(java.net.URI uri)
Deprecated.private java.net.URI
serviceUri(io.grpc.Channel channel, io.grpc.MethodDescriptor<?,?> method)
Deprecated.Generate a JWT-specific service URI.private static io.grpc.Metadata
toHeaders(java.util.Map<java.lang.String,java.util.List<java.lang.String>> metadata)
Deprecated.
-
-
-
Method Detail
-
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 java.net.URI serviceUri(io.grpc.Channel channel, io.grpc.MethodDescriptor<?,?> method) throws io.grpc.StatusException
Deprecated.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
private java.net.URI removePort(java.net.URI uri) throws io.grpc.StatusException
Deprecated.- Throws:
io.grpc.StatusException
-
getRequestMetadata
private java.util.Map<java.lang.String,java.util.List<java.lang.String>> getRequestMetadata(java.net.URI uri) throws io.grpc.StatusException
Deprecated.- Throws:
io.grpc.StatusException
-
toHeaders
private static final io.grpc.Metadata toHeaders(java.util.Map<java.lang.String,java.util.List<java.lang.String>> metadata)
Deprecated.
-
-