io.quarkus.resteasy.reactive.jackson.SecureField Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-rest-jackson Show documentation
Show all versions of quarkus-rest-jackson Show documentation
Jackson serialization support for Quarkus REST. This extension is not compatible with the quarkus-resteasy extension, or any of the extensions that depend on it
package io.quarkus.resteasy.reactive.jackson;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import io.smallrye.common.annotation.Experimental;
/**
* Annotation that can be used on fields (or getters) of POJOs returned by RESTEasy Reactive Resource methods, to signal that
* then return type when serialized to JSON,
* will not include fields whose security requirements match the current user's security scope.
*
* Warning: This annotation does not work when placed on a JAX-RS method that returns {@link jakarta.ws.rs.core.Response}.
* Users that wish to use the feature and have the ability to configure the response of the JAX-RS method are advised to
* use {@link org.jboss.resteasy.reactive.RestResponse}.
*/
@Experimental(value = "Remains to be determined if this is the best possible API for users to configure security of serialized fields")
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.METHOD, ElementType.FIELD })
public @interface SecureField {
String[] rolesAllowed();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy