Posts

Showing posts with the label helidonwithpratik

Oracle Helidon MP - Basic Authentication

Image
Hi Folks, Today I'm sharing my learning on "Oracle Helidon MP - Basic Authentication". Basic Authentication is a easy concept by which we can authenticate and authorise a user based on his credentials and roles. Step 0: Without Authentication. Step 1: Add maven dependencies.           < dependency >      < groupId > io.helidon.microprofile </ groupId >      < artifactId > helidon-microprofile-security </ artifactId > </ dependency > < dependency >      < groupId > io.helidon.security.providers </ groupId >      < artifactId > helidon-security-providers-http-auth </ artifactId > </ dependency > Step 2: Add Authentication & Authorisation Annotations. import io.helidon.security.annotations.Authenticated ; import jakarta.annotation.security.RolesAllowed ; @Authenticated         ...

Profiling in Oracle Helidon

Image
 Hello Folks, Today I'm sharing my learning on "Profiling in Oracle Helidon". Profiling is a easy concept where where we can keep multiple files are per our environment and execute the application accordingly. Here we will see the changes in datax variable in profiling. Profiling can be achieved in two ways i.e. 1. yml file 2. command prompt In both scenarios we need to keep multiple profiling file (microprofile-config) I've kept three files. microprofile-config.properties microprofile-config-uat.properties microprofile-config-prod.properties I'll demonstrate both the scenarios 1. yml file with prod profiling 2. yml with uat profiling to test the application, I've created a demo controller. save the project and perfrom, 1. mvn clean install 2. java -jar name_of_the_application.jar                                                   ...

Enable OpenAPI and Swagger UI in Helidon MP application

Image
Hi Team, Today I'm sharing my learning to how to configure OpenAPI and Swagger UI in a Helidon MP application. Helidon is closely associated with OpenAPI, hence we only need configurations to enable Open API. dependencies           <dependency> <groupId>io.helidon.microprofile.openapi</groupId> <artifactId>helidon-microprofile-openapi</artifactId> <scope>runtime</scope> </dependency> <dependency> <groupId>org.eclipse.microprofile.openapi</groupId> <artifactId>microprofile-openapi-api</artifactId> </dependency> <dependency> <groupId>io.helidon.integrations.openapi-ui</groupId> <artifactId>helidon-integrations-openapi-ui</artifactId> <scope>runtime</scope> </dependency> plugins    ...