Package ubic.gemma.rest.providers
Class AuthenticationExceptionMapper
- java.lang.Object
-
- ubic.gemma.rest.providers.AbstractExceptionMapper<org.springframework.security.core.AuthenticationException>
-
- ubic.gemma.rest.providers.AuthenticationExceptionMapper
-
- All Implemented Interfaces:
javax.ws.rs.ext.ExceptionMapper<org.springframework.security.core.AuthenticationException>
@Provider @Component public class AuthenticationExceptionMapper extends AbstractExceptionMapper<org.springframework.security.core.AuthenticationException>
Handles Spring SecurityAuthenticationException
by producing a 403 Forbidden response.
-
-
Constructor Summary
Constructors Constructor Description AuthenticationExceptionMapper(io.swagger.v3.oas.models.OpenAPI spec, BuildInfo buildInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.ws.rs.core.Response.Status
getStatus(org.springframework.security.core.AuthenticationException exception)
Translate the exception to an HTTPResponse.Status
.protected boolean
logException(org.springframework.security.core.AuthenticationException e)
Indicate if the given exception should be logged.-
Methods inherited from class ubic.gemma.rest.providers.AbstractExceptionMapper
getResponseBuilder, getWellComposedErrorBody, toResponse
-
-
-
-
Constructor Detail
-
AuthenticationExceptionMapper
@Autowired public AuthenticationExceptionMapper(io.swagger.v3.oas.models.OpenAPI spec, BuildInfo buildInfo)
-
-
Method Detail
-
getStatus
protected javax.ws.rs.core.Response.Status getStatus(org.springframework.security.core.AuthenticationException exception)
Description copied from class:AbstractExceptionMapper
Translate the exception to an HTTPResponse.Status
.- Specified by:
getStatus
in classAbstractExceptionMapper<org.springframework.security.core.AuthenticationException>
-
logException
protected boolean logException(org.springframework.security.core.AuthenticationException e)
Description copied from class:AbstractExceptionMapper
Indicate if the given exception should be logged.- Overrides:
logException
in classAbstractExceptionMapper<org.springframework.security.core.AuthenticationException>
-
-