@GrpcGlobalServerInterceptor public class AuthenticatingServerInterceptor extends Object implements ServerInterceptor
read
the credentials from the client and
authenticate
them.
Note: This interceptor works similar to
Contexts.interceptCall(Context, ServerCall, Metadata, ServerCallHandler)
.
Modifier and Type | Field and Description |
---|---|
static Context.Key<Authentication> |
AUTHENTICATION_CONTEXT_KEY
The context key that can be used to retrieve the associated
Authentication . |
Constructor and Description |
---|
AuthenticatingServerInterceptor(AuthenticationManager authenticationManager,
GrpcAuthenticationReader authenticationReader) |
Modifier and Type | Method and Description |
---|---|
<ReqT,RespT> |
interceptCall(ServerCall<ReqT,RespT> call,
Metadata headers,
ServerCallHandler<ReqT,RespT> next) |
public static final Context.Key<Authentication> AUTHENTICATION_CONTEXT_KEY
Authentication
.@Autowired public AuthenticatingServerInterceptor(AuthenticationManager authenticationManager, GrpcAuthenticationReader authenticationReader)
public <ReqT,RespT> ServerCall.Listener<ReqT> interceptCall(ServerCall<ReqT,RespT> call, Metadata headers, ServerCallHandler<ReqT,RespT> next)
interceptCall
in interface ServerInterceptor