io.deephaven.server.util.AuthorizationWrappedGrpcBinding Maven / Gradle / Ivy
The newest version!
//
// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending
//
package io.deephaven.server.util;
import io.deephaven.auth.ServiceAuthWiring;
import io.grpc.BindableService;
import io.grpc.ServerServiceDefinition;
public class AuthorizationWrappedGrpcBinding implements BindableService {
private final ServiceAuthWiring authWiring;
private final ServiceImplBase delegate;
public AuthorizationWrappedGrpcBinding(ServiceAuthWiring authWiring, ServiceImplBase delegate) {
this.authWiring = authWiring;
this.delegate = delegate;
}
@Override
public ServerServiceDefinition bindService() {
return authWiring.intercept(delegate);
}
}