BAEL-4171: Add SecurityAdviceTrait to the ExceptionTranslator (#9418)
This commit is contained in:
parent
2af1e30a8f
commit
d59d2e3793
|
@ -14,6 +14,7 @@ import org.zalando.problem.Problem;
|
|||
import org.zalando.problem.ProblemBuilder;
|
||||
import org.zalando.problem.Status;
|
||||
import org.zalando.problem.spring.web.advice.ProblemHandling;
|
||||
import org.zalando.problem.spring.web.advice.security.SecurityAdviceTrait;
|
||||
import org.zalando.problem.violations.ConstraintViolationProblem;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
@ -28,7 +29,7 @@ import java.util.stream.Collectors;
|
|||
* The error response follows RFC7807 - Problem Details for HTTP APIs (https://tools.ietf.org/html/rfc7807)
|
||||
*/
|
||||
@ControllerAdvice
|
||||
public class ExceptionTranslator implements ProblemHandling {
|
||||
public class ExceptionTranslator implements ProblemHandling, SecurityAdviceTrait {
|
||||
|
||||
/**
|
||||
* Post-process the Problem payload to add the message key for the front-end if needed
|
||||
|
|
|
@ -14,6 +14,7 @@ import org.zalando.problem.Problem;
|
|||
import org.zalando.problem.ProblemBuilder;
|
||||
import org.zalando.problem.Status;
|
||||
import org.zalando.problem.spring.web.advice.ProblemHandling;
|
||||
import org.zalando.problem.spring.web.advice.security.SecurityAdviceTrait;
|
||||
import org.zalando.problem.violations.ConstraintViolationProblem;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
@ -28,7 +29,7 @@ import java.util.stream.Collectors;
|
|||
* The error response follows RFC7807 - Problem Details for HTTP APIs (https://tools.ietf.org/html/rfc7807)
|
||||
*/
|
||||
@ControllerAdvice
|
||||
public class ExceptionTranslator implements ProblemHandling {
|
||||
public class ExceptionTranslator implements ProblemHandling, SecurityAdviceTrait {
|
||||
|
||||
/**
|
||||
* Post-process the Problem payload to add the message key for the front-end if needed
|
||||
|
|
|
@ -14,6 +14,7 @@ import org.zalando.problem.Problem;
|
|||
import org.zalando.problem.ProblemBuilder;
|
||||
import org.zalando.problem.Status;
|
||||
import org.zalando.problem.spring.web.advice.ProblemHandling;
|
||||
import org.zalando.problem.spring.web.advice.security.SecurityAdviceTrait;
|
||||
import org.zalando.problem.violations.ConstraintViolationProblem;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
@ -28,7 +29,7 @@ import java.util.stream.Collectors;
|
|||
* The error response follows RFC7807 - Problem Details for HTTP APIs (https://tools.ietf.org/html/rfc7807)
|
||||
*/
|
||||
@ControllerAdvice
|
||||
public class ExceptionTranslator implements ProblemHandling {
|
||||
public class ExceptionTranslator implements ProblemHandling, SecurityAdviceTrait {
|
||||
|
||||
/**
|
||||
* Post-process the Problem payload to add the message key for the front-end if needed
|
||||
|
|
Loading…
Reference in New Issue