feat(mobile): Implement Keycloak WebView authentication with HTTP callback
- 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
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
import '../../../../core/models/evenement_model.dart';
|
||||
|
||||
/// Interface du repository pour les événements
|
||||
/// Définit les contrats pour l'accès aux données des événements
|
||||
abstract class EvenementRepository {
|
||||
/// Récupère la liste des événements à venir
|
||||
Future<List<EvenementModel>> getEvenementsAVenir({
|
||||
int page = 0,
|
||||
int size = 10,
|
||||
});
|
||||
|
||||
/// Récupère la liste des événements publics
|
||||
Future<List<EvenementModel>> getEvenementsPublics({
|
||||
int page = 0,
|
||||
int size = 20,
|
||||
});
|
||||
|
||||
/// Récupère tous les événements avec pagination
|
||||
Future<List<EvenementModel>> getEvenements({
|
||||
int page = 0,
|
||||
int size = 20,
|
||||
String sortField = 'dateDebut',
|
||||
String sortDirection = 'asc',
|
||||
});
|
||||
|
||||
/// Récupère un événement par son ID
|
||||
Future<EvenementModel> getEvenementById(String id);
|
||||
|
||||
/// Recherche d'événements par terme
|
||||
Future<List<EvenementModel>> rechercherEvenements(
|
||||
String terme, {
|
||||
int page = 0,
|
||||
int size = 20,
|
||||
});
|
||||
|
||||
/// Récupère les événements par type
|
||||
Future<List<EvenementModel>> getEvenementsByType(
|
||||
TypeEvenement type, {
|
||||
int page = 0,
|
||||
int size = 20,
|
||||
});
|
||||
|
||||
/// Crée un nouvel événement
|
||||
Future<EvenementModel> createEvenement(EvenementModel evenement);
|
||||
|
||||
/// Met à jour un événement existant
|
||||
Future<EvenementModel> updateEvenement(String id, EvenementModel evenement);
|
||||
|
||||
/// Supprime un événement
|
||||
Future<void> deleteEvenement(String id);
|
||||
|
||||
/// Change le statut d'un événement
|
||||
Future<EvenementModel> changerStatutEvenement(
|
||||
String id,
|
||||
StatutEvenement nouveauStatut,
|
||||
);
|
||||
|
||||
/// Récupère les statistiques des événements
|
||||
Future<Map<String, dynamic>> getStatistiquesEvenements();
|
||||
}
|
||||
Reference in New Issue
Block a user