resteasy

Keycloak/OIDC : retrieve user groups attributes

|▌冷眼眸甩不掉的悲伤 提交于 2020-07-06 19:57:46
问题 I've extracted a user's groups information from the OIDC endpoint of Keycloak, but they don't come with the group ATTRIBUTES I defined (see Attributes tab into the group form, near Settings). Is there a claim to add to my request? I'm using a RESTeasy client to reach Keycloak's admin API (had much better results than using the provided admin client, yet): @Path("/admin/realms/{realm}") public interface KeycloakAdminService { @GET @Path("/users/{id}/groups") @Consumes(MediaType.APPLICATION

Mocking a post request using Mockito raises javax.ws.rs.ProcessingException: RESTEASY004655: Unable to invoke request

邮差的信 提交于 2020-06-29 04:14:30
问题 I'm totally new to Mockito and I need to mock a post request so that I can test a client alone. However, no matter what I do I get the RESTEASY004655: Unable to invoke request exception. This is the simplified version of what I have so far. I have the class TestClassA which sends a post request to an api as follows: import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.concurrent.TimeUnit; import javax.ws.rs.client.Entity; import javax.ws.rs.core

Mocking a post request using Mockito raises javax.ws.rs.ProcessingException: RESTEASY004655: Unable to invoke request

北城余情 提交于 2020-06-29 04:14:07
问题 I'm totally new to Mockito and I need to mock a post request so that I can test a client alone. However, no matter what I do I get the RESTEASY004655: Unable to invoke request exception. This is the simplified version of what I have so far. I have the class TestClassA which sends a post request to an api as follows: import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.concurrent.TimeUnit; import javax.ws.rs.client.Entity; import javax.ws.rs.core

Why in multiple connections to PricesResource Publisher, only one gets the stream?

核能气质少年 提交于 2020-06-17 09:33:10
问题 It seems that only one http client gets the stream of data, while the others do not. Is it true that the Publisher is hot data, and that it should broadcast to all subscribers? Please find more in Can I allow multiple http clients to consume a Flowable stream of data with resteasy-rxjava2 / quarkus? package org.acme.kafka; import javax.inject.Inject; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import io.reactivex.Flowable;

@MultipartForm How to get the original file name?

送分小仙女□ 提交于 2020-06-10 08:23:53
问题 I am using jboss's rest-easy multipart provider for importing a file. I read here http://docs.jboss.org/resteasy/docs/1.0.0.GA/userguide/html/Content_Marshalling_Providers.html#multipartform_annotation regarding @MultipartForm because I can exactly map it with my POJO. Below is my POJO public class SoftwarePackageForm { @FormParam("softwarePackage") private File file; private String contentDisposition; public File getFile() { return file; } public void setFile(File file) { this.file = file; }

@MultipartForm How to get the original file name?

烂漫一生 提交于 2020-06-10 08:22:30
问题 I am using jboss's rest-easy multipart provider for importing a file. I read here http://docs.jboss.org/resteasy/docs/1.0.0.GA/userguide/html/Content_Marshalling_Providers.html#multipartform_annotation regarding @MultipartForm because I can exactly map it with my POJO. Below is my POJO public class SoftwarePackageForm { @FormParam("softwarePackage") private File file; private String contentDisposition; public File getFile() { return file; } public void setFile(File file) { this.file = file; }

Can I allow multiple http clients to consume a Flowable stream of data with resteasy-rxjava2 / quarkus?

大城市里の小女人 提交于 2020-05-30 09:49:20
问题 Currently I am able to see the streaming values exposed by the code below, but only one http client will receive the continuous stream of values, the others will not be able to. The code, a modified version of the quarkus quickstart for kafka reactive streaming is: @Path("/migrations") public class StreamingResource { private volatile Map<String, String> counterBySystemDate = new ConcurrentHashMap<>(); @Inject @Channel("migrations") Flowable<String> counters; @GET @Path("/stream") @Produces

Can I allow multiple http clients to consume a Flowable stream of data with resteasy-rxjava2 / quarkus?

丶灬走出姿态 提交于 2020-05-30 09:48:38
问题 Currently I am able to see the streaming values exposed by the code below, but only one http client will receive the continuous stream of values, the others will not be able to. The code, a modified version of the quarkus quickstart for kafka reactive streaming is: @Path("/migrations") public class StreamingResource { private volatile Map<String, String> counterBySystemDate = new ConcurrentHashMap<>(); @Inject @Channel("migrations") Flowable<String> counters; @GET @Path("/stream") @Produces