Package io.meeds.appcenter.rest.util
Class RestUtils
java.lang.Object
io.meeds.appcenter.rest.util.RestUtils
Builds the answers of the handlers that return per-user or role-restricted
content from a URL that does not identify the user. Such an answer must
never be stored by a shared cache: it would be served to another user, or
to a caller the role check refuses. The platform's security filter chain
installs no header writer, so the handler is the only place where the
directives can be set, on the success and on every refusal it renders.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> org.springframework.http.ResponseEntity<T> privateAnswer(T body) static <T> org.springframework.http.ResponseEntity<T> privateRefusal(org.springframework.http.HttpStatus status)
-
Method Details
-
privateAnswer
public static <T> org.springframework.http.ResponseEntity<T> privateAnswer(T body) -
privateRefusal
public static <T> org.springframework.http.ResponseEntity<T> privateRefusal(org.springframework.http.HttpStatus status)
-