-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20549 from geoand/rr-filter-fields-security
Introduce the ability to filter json output based on user roles
- Loading branch information
Showing
41 changed files
with
1,567 additions
and
384 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 0 additions & 77 deletions
77
...esteasy/reactive/jackson/deployment/processor/ResteasyReactiveCommonJacksonProcessor.java
This file was deleted.
Oops, something went wrong.
File renamed without changes.
41 changes: 41 additions & 0 deletions
41
...asy/reactive/jackson/deployment/processor/ResourceMethodCustomSerializationBuildItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package io.quarkus.resteasy.reactive.jackson.deployment.processor; | ||
|
||
import java.lang.reflect.Type; | ||
import java.util.function.BiFunction; | ||
|
||
import org.jboss.jandex.ClassInfo; | ||
import org.jboss.jandex.MethodInfo; | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import com.fasterxml.jackson.databind.ObjectWriter; | ||
|
||
import io.quarkus.builder.item.MultiBuildItem; | ||
|
||
/** | ||
* Used to pass info about a JAX-RS resource method that needs to perform custom serialization | ||
*/ | ||
public final class ResourceMethodCustomSerializationBuildItem extends MultiBuildItem { | ||
|
||
private final MethodInfo methodInfo; | ||
private final ClassInfo declaringClassInfo; | ||
private final Class<? extends BiFunction<ObjectMapper, Type, ObjectWriter>> customSerializationProvider; | ||
|
||
public ResourceMethodCustomSerializationBuildItem(MethodInfo methodInfo, ClassInfo declaringClassInfo, | ||
Class<? extends BiFunction<ObjectMapper, Type, ObjectWriter>> customSerializationProvider) { | ||
this.methodInfo = methodInfo; | ||
this.declaringClassInfo = declaringClassInfo; | ||
this.customSerializationProvider = customSerializationProvider; | ||
} | ||
|
||
public MethodInfo getMethodInfo() { | ||
return methodInfo; | ||
} | ||
|
||
public ClassInfo getDeclaringClassInfo() { | ||
return declaringClassInfo; | ||
} | ||
|
||
public Class<? extends BiFunction<ObjectMapper, Type, ObjectWriter>> getCustomSerializationProvider() { | ||
return customSerializationProvider; | ||
} | ||
} |
Oops, something went wrong.