Package io.quarkus.grpc.auth
Class AuthExceptionHandler<ReqT,RespT>
java.lang.Object
io.grpc.ServerCall.Listener<ReqT>
io.grpc.ForwardingServerCallListener<ReqT>
io.grpc.ForwardingServerCallListener.SimpleForwardingServerCallListener<ReqT>
io.quarkus.grpc.ExceptionHandler<ReqT,RespT>
io.quarkus.grpc.auth.AuthExceptionHandler<ReqT,RespT>
- All Implemented Interfaces:
jakarta.enterprise.inject.spi.Prioritized
public class AuthExceptionHandler<ReqT,RespT>
extends ExceptionHandler<ReqT,RespT>
implements jakarta.enterprise.inject.spi.Prioritized
Exception mapper for authentication and authorization exceptions
To alter mapping exceptions, create a subclass of this handler and create an appropriate
AuthExceptionHandlerProvider-
Nested Class Summary
Nested classes/interfaces inherited from class io.grpc.ForwardingServerCallListener
io.grpc.ForwardingServerCallListener.SimpleForwardingServerCallListener<ReqT extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionAuthExceptionHandler(io.grpc.ServerCall.Listener<ReqT> listener, io.grpc.ServerCall<ReqT, RespT> serverCall, io.grpc.Metadata metadata) -
Method Summary
Methods inherited from class io.quarkus.grpc.ExceptionHandler
onHalfClose, onMessage, onReadyMethods inherited from class io.grpc.ForwardingServerCallListener.SimpleForwardingServerCallListener
delegate
-
Constructor Details
-
AuthExceptionHandler
-
-
Method Details
-
handleException
protected void handleException(Throwable exception, io.grpc.ServerCall<ReqT, RespT> serverCall, io.grpc.Metadata metadata) Maps exception to a gRPC error. Override this method to customize the mapping- Specified by:
handleExceptionin classExceptionHandler<ReqT,RespT> - Parameters:
exception- exception thrownserverCall- server call to close with errormetadata- call metadata
-
getPriority
public int getPriority()- Specified by:
getPriorityin interfacejakarta.enterprise.inject.spi.Prioritized
-
onCancel
public void onCancel()- Overrides:
onCancelin classio.grpc.ServerCall.Listener<ReqT extends Object>
-
onComplete
public void onComplete()- Overrides:
onCompletein classio.grpc.ServerCall.Listener<ReqT extends Object>
-
toString
-