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 Security
AuthenticationException
by producing a 403 Forbidden response.-
Field Summary
Fields inherited from class ubic.gemma.rest.providers.AbstractExceptionMapper
log
-
Constructor Summary
ConstructorsConstructorDescriptionAuthenticationExceptionMapper
(String hostUrl, io.swagger.v3.oas.models.OpenAPI spec, BuildInfo buildInfo) -
Method Summary
Modifier and TypeMethodDescriptionprotected javax.ws.rs.core.Response.Status
getStatus
(org.springframework.security.core.AuthenticationException exception) Translate the exception to an HTTPResponse.Status
.Methods inherited from class ubic.gemma.rest.providers.AbstractExceptionMapper
getResponseBuilder, getWellComposedErrorBody, toResponse
-
Constructor Details
-
AuthenticationExceptionMapper
-
-
Method Details
-
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>
-