Package io.quarkus.grpc.auth
Class DefaultAuthExceptionHandlerProvider
java.lang.Object
io.quarkus.grpc.auth.DefaultAuthExceptionHandlerProvider
- All Implemented Interfaces:
AuthExceptionHandlerProvider,jakarta.enterprise.inject.spi.Prioritized
@Singleton
public class DefaultAuthExceptionHandlerProvider
extends Object
implements AuthExceptionHandlerProvider
-
Field Summary
Fields inherited from interface io.quarkus.grpc.auth.AuthExceptionHandlerProvider
DEFAULT_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<ReqT,RespT>
AuthExceptionHandler<ReqT, RespT> createHandler(io.grpc.ServerCall.Listener<ReqT> listener, io.grpc.ServerCall<ReqT, RespT> serverCall, io.grpc.Metadata metadata) intbooleanhandlesException(Throwable failure) (package private) static io.grpc.StatustransformToStatusException(boolean addExceptionMessage, Throwable exception) io.grpc.StatusException
-
Constructor Details
-
DefaultAuthExceptionHandlerProvider
public DefaultAuthExceptionHandlerProvider()
-
-
Method Details
-
getPriority
public int getPriority()- Specified by:
getPriorityin interfacejakarta.enterprise.inject.spi.Prioritized
-
createHandler
public <ReqT,RespT> AuthExceptionHandler<ReqT,RespT> createHandler(io.grpc.ServerCall.Listener<ReqT> listener, io.grpc.ServerCall<ReqT, RespT> serverCall, io.grpc.Metadata metadata) - Specified by:
createHandlerin interfaceAuthExceptionHandlerProvider
-
transformToStatusException
- Specified by:
transformToStatusExceptionin interfaceAuthExceptionHandlerProvider- Parameters:
t- security exception this provider can handle according to theAuthExceptionHandlerProvider.handlesException(Throwable)- Returns:
- status exception
-
handlesException
- Specified by:
handlesExceptionin interfaceAuthExceptionHandlerProvider- Parameters:
failure- any gRPC request failure- Returns:
- whether this provider should create response status for given failure
-
transformToStatusException
-