Questions tagged [micronaut-client]

104 questions
0
votes
0 answers

Can I use micronaut-serde-jackson + declarative http client + lombok?

I am attempting to use micronaut-serde-jackson with a declarative HTTP client to make a simple GET request and retrieve a deserialized POJO. The POJO looks like this (I'm using lombok): @Data @Serdeable public class Thing { private String…
Gabriel Bauman
  • 2,270
  • 1
  • 22
  • 36
0
votes
1 answer

Configuring default micronaut httpClient properties using ConfigurationProperties

I am writing a java library module in Micronaut which has an httpClient. The idea is that my microservices will use this library as a jar dependency and use the httpClient. Problem Statement : I want to configure my HttpClient without using…
Shrinath
  • 534
  • 10
  • 18
0
votes
2 answers

How to pass the value to the AuthenticationProvider from HttpRequest in Micronaut java with Jnunit 5

Using Micronaut HttpClient to perform the HTTP calls in Junit 5 testing. I am trying to pass the value to AuthenticationProvider using HttpRequest as below @MicronautTest public class ProductCreateTest extends TestContainerFixture { @Inject …
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
0
votes
1 answer

Authentication null with JUnit 5 testing Micronaut 3.3.4

Trying to protect the controller with micronaut security using JUnit testing, getting authentication as NULL. @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @MicronautTest public class ProductCreateTest extends TestContainerFixture { …
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
0
votes
1 answer

Rest end point unit testing using JWT token validation in Micronaut

Using micronaut to create rest end-point which is protected by using micronaut-jwt security @Post @IRequirement(resourceName = ClaimType.TAG_PRODUCT, permission = {ClaimValue.TAG_OWNER,ClaimValue.TAG_CREATOR,ClaimValue.TAG_MAINTAINER…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
0
votes
0 answers

Here I am trying to do a simple CRUD operation using micronaut microservices. But getting some errors

I am trying to do some crud operation using micornaut microservices in java. But getting this error, Please if anyone can help me out. [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.625 s <<< FAILURE! - in…
0
votes
1 answer

i.m.s.t.j.s.jwks.JwksSignature - Exception loading JWK from https://localhost:5001/.well-known/openid-configuration/jwks. Micronaut Java

I am using the Asp.net core Identity server for OAuth with Micronaut 2.5.6 application as below configuration micronaut: application: name: feteBirdService server: port: 8085 cors: enabled: true security: enabled: true …
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
0
votes
2 answers

Micronaut fails to load and use my TypeConverter implementation

I have a controller method, that takes in a POJO. @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Dto { private LocalDate endDate; private String token; private TransactionType type; } Transaction type is a…
Jim
  • 14,952
  • 15
  • 80
  • 167
0
votes
0 answers

How to Write This code in Micronaut Framework

I have Used OKHtttpClient Package .Need to submit data in Post method and mediatype should be in x-www-form-urlencoded ''' OkHttpClient client = new OkHttpClient().newBuilder() .build(); okhttp3.MediaType mediaType =…
Boxer Robert
  • 1,169
  • 2
  • 8
  • 14
0
votes
2 answers

Environment based file pickup in Micronaut

Trying to use the different configuration files based on the environment. For example In the dev environment, I have the below file application-dev.yml micronaut: security: enabled: true token: jwt: enabled: true …
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
0
votes
0 answers

401 with declarative Http Client on the API URL with @Secured(SecurityRule.IS_ANONYMOUS) annotation

When we add the Micronaut security all the URLs are protected. while using the @Secured(SecurityRule.IS_ANONYMOUS) annotation still facing the 401 exception public interface ISubCategoryOperation { @Get("/{categoryId}/sub-category") …
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
0
votes
1 answer

How to inject HTTP client from library in Micronaut app?

I have an external http client to other service and I've imported it to my micronaut app but receives an error which points: Caused by: io.micronaut.context.exceptions.NoSuchBeanException: No bean of type [xxx.files.client.micronaut.FilesClient]…
Kacper
  • 1,000
  • 2
  • 10
  • 18
0
votes
0 answers

Micronaut security with OKTA - OAUTH 2.0

I have a Micronaut rest endpoint which is secured by @Secured(SecurityRule.IS_AUTHENTICATED) @Secured(SecurityRule.IS_AUTHENTICATED) @Controller("/product") @Secured({"Admin"}) public record ProductController(IProducer iProducer) { @Get(uri =…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
0
votes
1 answer

Swagger open API definition not working with Micronaut JWT security Micronaut version 2.2.1

Using the Micronaut 2.2.1 with JWT security and swagger open API. The controller definition is not working as shown below Application.yml micronaut: application: name: demo security: enabled: true intercept-url-map: - pattern:…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
0
votes
1 answer

Mapping the RabbitListenerExceptionHandler with the Micronaut Global ExceptionHandler

I am trying to handle the exception thrown from the Rabbit Listener and expose the error to the Rest endpoint. Rabbit Listener @Queue(ProductTopicConstants.GET_PRODUCT) public ProductViewModel find(String id) { try { …
San Jaisy
  • 15,327
  • 34
  • 171
  • 290