- Replace flutter_appauth with custom WebView implementation to resolve deep link issues - Add KeycloakWebViewAuthService with integrated WebView for seamless authentication - Configure Android manifest for HTTP cleartext traffic support - Add network security config for development environment (192.168.1.11) - Update Keycloak client to use HTTP callback endpoint (http://192.168.1.11:8080/auth/callback) - Remove obsolete keycloak_auth_service.dart and temporary scripts - Clean up dependencies and regenerate injection configuration - Tested successfully on multiple Android devices (Xiaomi 2201116TG, SM A725F) BREAKING CHANGE: Authentication flow now uses WebView instead of external browser - Users will see Keycloak login page within the app instead of browser redirect - Resolves ERR_CLEARTEXT_NOT_PERMITTED and deep link state management issues - Maintains full OIDC compliance with PKCE flow and secure token storage Technical improvements: - WebView with custom navigation delegate for callback handling - Automatic token extraction and user info parsing from JWT - Proper error handling and user feedback - Consistent authentication state management across app lifecycle
279 lines
10 KiB
XML
279 lines
10 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<groupId>dev.lions.unionflow</groupId>
|
|
<artifactId>unionflow-server-impl-quarkus</artifactId>
|
|
<version>1.0.0</version>
|
|
<packaging>jar</packaging>
|
|
|
|
<name>UnionFlow Server Implementation (Quarkus)</name>
|
|
<description>Implémentation Quarkus du serveur UnionFlow</description>
|
|
|
|
<properties>
|
|
<maven.compiler.source>17</maven.compiler.source>
|
|
<maven.compiler.target>17</maven.compiler.target>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
|
|
<quarkus.platform.version>3.15.1</quarkus.platform.version>
|
|
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
|
|
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
|
|
|
|
<!-- Jacoco -->
|
|
<jacoco.version>0.8.11</jacoco.version>
|
|
</properties>
|
|
|
|
<dependencyManagement>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>${quarkus.platform.group-id}</groupId>
|
|
<artifactId>${quarkus.platform.artifact-id}</artifactId>
|
|
<version>${quarkus.platform.version}</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
</dependencyManagement>
|
|
|
|
<dependencies>
|
|
<!-- Dépendance vers l'API -->
|
|
<dependency>
|
|
<groupId>dev.lions.unionflow</groupId>
|
|
<artifactId>unionflow-server-api</artifactId>
|
|
<version>1.0.0</version>
|
|
</dependency>
|
|
|
|
<!-- Quarkus Core -->
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-arc</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-rest</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-rest-jackson</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Base de données PostgreSQL -->
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-hibernate-orm-panache</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-jdbc-postgresql</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-jdbc-h2</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-flyway</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Sécurité Keycloak OIDC -->
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-oidc</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-keycloak-authorization</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Configuration et santé -->
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-config-yaml</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-smallrye-health</artifactId>
|
|
</dependency>
|
|
|
|
<!-- OpenAPI/Swagger -->
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-smallrye-openapi</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Validation -->
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-hibernate-validator</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Lombok -->
|
|
<dependency>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
<version>1.18.30</version>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
|
|
<!-- Tests -->
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-junit5</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-junit5-mockito</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.rest-assured</groupId>
|
|
<artifactId>rest-assured</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-test-security</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.assertj</groupId>
|
|
<artifactId>assertj-core</artifactId>
|
|
<version>3.24.2</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.mockito</groupId>
|
|
<artifactId>mockito-core</artifactId>
|
|
<version>5.7.0</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>${quarkus.platform.group-id}</groupId>
|
|
<artifactId>quarkus-maven-plugin</artifactId>
|
|
<version>${quarkus.platform.version}</version>
|
|
<extensions>true</extensions>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>build</goal>
|
|
<goal>generate-code</goal>
|
|
<goal>generate-code-tests</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<version>3.11.0</version>
|
|
<configuration>
|
|
<source>17</source>
|
|
<target>17</target>
|
|
<encoding>UTF-8</encoding>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<!-- Jacoco pour la couverture de code -->
|
|
<plugin>
|
|
<groupId>org.jacoco</groupId>
|
|
<artifactId>jacoco-maven-plugin</artifactId>
|
|
<version>${jacoco.version}</version>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>prepare-agent</goal>
|
|
</goals>
|
|
</execution>
|
|
<execution>
|
|
<id>report</id>
|
|
<phase>test</phase>
|
|
<goals>
|
|
<goal>report</goal>
|
|
</goals>
|
|
<configuration>
|
|
<excludes>
|
|
<!-- Exclure les classes générées par Lombok -->
|
|
<exclude>**/*$*Builder*.class</exclude>
|
|
<exclude>**/Membre$MembreBuilder.class</exclude>
|
|
</excludes>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>check</id>
|
|
<goals>
|
|
<goal>check</goal>
|
|
</goals>
|
|
<configuration>
|
|
<excludes>
|
|
<!-- Exclure les classes générées par Lombok -->
|
|
<exclude>**/*$*Builder*.class</exclude>
|
|
<exclude>**/Membre$MembreBuilder.class</exclude>
|
|
</excludes>
|
|
<rules>
|
|
<rule>
|
|
<element>BUNDLE</element>
|
|
<limits>
|
|
<limit>
|
|
<counter>LINE</counter>
|
|
<value>COVEREDRATIO</value>
|
|
<minimum>1.00</minimum>
|
|
</limit>
|
|
<limit>
|
|
<counter>BRANCH</counter>
|
|
<value>COVEREDRATIO</value>
|
|
<minimum>1.00</minimum>
|
|
</limit>
|
|
<limit>
|
|
<counter>INSTRUCTION</counter>
|
|
<value>COVEREDRATIO</value>
|
|
<minimum>1.00</minimum>
|
|
</limit>
|
|
<limit>
|
|
<counter>METHOD</counter>
|
|
<value>COVEREDRATIO</value>
|
|
<minimum>1.00</minimum>
|
|
</limit>
|
|
</limits>
|
|
</rule>
|
|
</rules>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
<profiles>
|
|
<profile>
|
|
<id>native</id>
|
|
<activation>
|
|
<property>
|
|
<name>native</name>
|
|
</property>
|
|
</activation>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>${quarkus.platform.group-id}</groupId>
|
|
<artifactId>quarkus-maven-plugin</artifactId>
|
|
<version>${quarkus.platform.version}</version>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>native-image</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
</profiles>
|
|
</project> |