fix(mobile): URL changement mdp corrigée + v3.0 — multi-org, AppAuth, sécurité prod
Auth: - profile_repository.dart: /api/auth/change-password → /api/membres/auth/change-password Multi-org (Phase 3): - OrgSelectorPage, OrgSwitcherBloc, OrgSwitcherEntry - org_context_service.dart: headers X-Active-Organisation-Id + X-Active-Role Navigation: - MorePage: navigation conditionnelle par typeOrganisation - Suppression adaptive_navigation (remplacé par main_navigation_layout) Auth AppAuth: - keycloak_webview_auth_service: fixes AppAuth Android - AuthBloc: gestion REAUTH_REQUIS + premierLoginComplet Onboarding: - Nouveaux états: payment_method_page, onboarding_shared_widgets - SouscriptionStatusModel mis à jour StatutValidationSouscription Android: - build.gradle: ProGuard/R8, network_security_config - Gradle wrapper mis à jour
This commit is contained in:
@@ -175,10 +175,10 @@ class ProfileRepositoryImpl implements IProfileRepository {
|
||||
@override
|
||||
Future<void> changePassword(String id, String oldPassword, String newPassword) async {
|
||||
try {
|
||||
// Appel direct à l'API Keycloak pour changer le mot de passe
|
||||
// Via l'endpoint /api/auth/change-password qui proxy vers Keycloak
|
||||
// Changement de mot de passe via l'API UnionFlow
|
||||
// Endpoint: POST /api/membres/auth/change-password (direct Keycloak Admin)
|
||||
final response = await _apiClient.post(
|
||||
'/api/auth/change-password',
|
||||
'/api/membres/auth/change-password',
|
||||
data: {
|
||||
'userId': id,
|
||||
'oldPassword': oldPassword,
|
||||
|
||||
@@ -17,6 +17,8 @@ import '../../../../core/l10n/locale_provider.dart';
|
||||
import '../../../../core/theme/theme_provider.dart';
|
||||
import '../../../authentication/presentation/bloc/auth_bloc.dart';
|
||||
import '../../../members/data/models/membre_complete_model.dart';
|
||||
import '../../../organizations/bloc/org_switcher_bloc.dart';
|
||||
import '../../../organizations/presentation/pages/org_selector_page.dart';
|
||||
import '../../../settings/presentation/pages/language_settings_page.dart';
|
||||
import '../../../settings/presentation/pages/privacy_settings_page.dart';
|
||||
import '../../../settings/presentation/pages/feedback_page.dart';
|
||||
@@ -309,6 +311,31 @@ class _ProfilePageState extends State<ProfilePage>
|
||||
_buildStatItem('ORG', orgValue),
|
||||
],
|
||||
),
|
||||
// Sélecteur d'organisation (multi-org)
|
||||
BlocBuilder<OrgSwitcherBloc, OrgSwitcherState>(
|
||||
builder: (context, orgState) {
|
||||
if (orgState is! OrgSwitcherLoaded ||
|
||||
orgState.organisations.length <= 1) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(top: 12),
|
||||
child: Center(
|
||||
child: OrgSwitcherBadge(
|
||||
activeOrg: orgState.active,
|
||||
onTap: () async {
|
||||
final selected = await showOrgSelector(context);
|
||||
if (selected != null && context.mounted) {
|
||||
context
|
||||
.read<OrgSwitcherBloc>()
|
||||
.add(OrgSwitcherSelectRequested(selected));
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -3,17 +3,26 @@ library profile_page_wrapper;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import '../../../../core/di/injection_container.dart';
|
||||
import '../../../organizations/bloc/org_switcher_bloc.dart';
|
||||
import '../bloc/profile_bloc.dart';
|
||||
import 'profile_page.dart';
|
||||
|
||||
/// Wrapper qui fournit le ProfileBloc à la ProfilePage
|
||||
/// Wrapper qui fournit le ProfileBloc et OrgSwitcherBloc à la ProfilePage.
|
||||
class ProfilePageWrapper extends StatelessWidget {
|
||||
const ProfilePageWrapper({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BlocProvider<ProfileBloc>(
|
||||
create: (_) => sl<ProfileBloc>(),
|
||||
return MultiBlocProvider(
|
||||
providers: [
|
||||
BlocProvider<ProfileBloc>(
|
||||
create: (_) => sl<ProfileBloc>(),
|
||||
),
|
||||
BlocProvider<OrgSwitcherBloc>(
|
||||
create: (_) => sl<OrgSwitcherBloc>()
|
||||
..add(const OrgSwitcherLoadRequested()),
|
||||
),
|
||||
],
|
||||
child: const ProfilePage(),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user