Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Micronaut keycloak

Dears,

Can anyone tell me which adapter to use with micronaut? i have server written on micronaut framework and keycloak up and running. For spring boot we use:

<dependency>
    <groupId>org.keycloak</groupId>
    <artifactId>keycloak-spring-boot-starter</artifactId>
</dependency>

one more question: Can someone explain to me the flow how we can detect if a user already signed in using keycloak?

like image 979
Heybat Avatar asked Oct 15 '25 15:10

Heybat


1 Answers

There is no official keycloak Micronaut adapter.

You can try the default Micronaut support oauth2 / jwt.

In this case, you will need to add these dependencies (and add their configuration properties):

 <dependency>
   <groupId>io.micronaut.security</groupId>
   <artifactId>micronaut-security</artifactId>
</dependency>
<dependency>
   <groupId>io.micronaut.security</groupId>
   <artifactId>micronaut-security-oauth2</artifactId>
</dependency>
<dependency>
   <groupId>io.micronaut.security</groupId>
   <artifactId>micronaut-security-jwt</artifactId>
</dependency>

A complete tutorial here: tutorial

In another way, you can try this open source / community adapter looorent that I have never tried.

(Always you can build your own module / extension).

like image 123
Ariel Carrera Avatar answered Oct 17 '25 07:10

Ariel Carrera