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 env)
Override this method to resolve an Exception to a single GraphQL error.
|
void |
setAuthenticationTrustResolver(org.springframework.security.authentication.AuthenticationTrustResolver resolver)
Set the resolver to use to check if an authentication is anonymous that
in turn determines whether
AccessDeniedException is classified
as "unauthorized" or "forbidden". |
isThreadLocalContextAware, resolveException, resolveToMultipleErrors, setThreadLocalContextAwarepublic SecurityDataFetcherExceptionResolver()
public void setAuthenticationTrustResolver(org.springframework.security.authentication.AuthenticationTrustResolver resolver)
AccessDeniedException is classified
as "unauthorized" or "forbidden".resolver - the resolver to useprotected GraphQLError resolveToSingleError(Throwable ex, DataFetchingEnvironment env)
DataFetcherExceptionResolverAdapterresolveToSingleError in class DataFetcherExceptionResolverAdapterex - the exception to resolveenv - the environment for the invoked DataFetchernull if unresolved