public class SecurityDataFetcherExceptionResolver extends DataFetcherExceptionResolverAdapter
DataFetcherExceptionResolver
for Spring Security exceptions. For use in applications with a non-reactive
transport (e.g. Spring MVC HTTP endpoint).| Constructor and Description |
|---|
SecurityDataFetcherExceptionResolver() |
| Modifier and Type | Method and Description |
|---|---|
protected GraphQLError |
resolveToSingleError(Throwable ex,
DataFetchingEnvironment environment)
Override this method to resolve an Exception to a single GraphQL error.
|
void |
setAuthenticationTrustResolver(org.springframework.security.authentication.AuthenticationTrustResolver trustResolver)
Set the resolver to use to check if an authentication is anonymous that
in turn determines whether
AccessDeniedException is classified
as "unauthorized" or "forbidden". |
from, isThreadLocalContextAware, resolveException, resolveToMultipleErrors, setThreadLocalContextAwareclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforSingleErrorpublic SecurityDataFetcherExceptionResolver()
public void setAuthenticationTrustResolver(org.springframework.security.authentication.AuthenticationTrustResolver trustResolver)
AccessDeniedException is classified
as "unauthorized" or "forbidden".trustResolver - the resolver to useprotected GraphQLError resolveToSingleError(Throwable ex, DataFetchingEnvironment environment)
DataFetcherExceptionResolverAdapterresolveToSingleError in class DataFetcherExceptionResolverAdapterex - the exception to resolveenvironment - the environment for the invoked DataFetchernull if unresolved