guidesoutenance

This commit is contained in:
2026-09-30 08:24:20 +02:00
parent 4de305bbf4
commit 07f88198c0
21 changed files with 1067 additions and 331 deletions

View File

@@ -0,0 +1,21 @@
/// Résultat d’un `POST /oauth/token` (connexion ou refresh).
class OAuthTokenPair {
const OAuthTokenPair({
required this.accessToken,
this.refreshToken,
});
final String accessToken;
final String? refreshToken;
}
OAuthTokenPair? parseOAuthTokenResponse(Map<String, dynamic> json) {
final access = json['access_token'];
if (access is! String || access.isEmpty) return null;
final refresh = json['refresh_token'];
return OAuthTokenPair(
accessToken: access,
refreshToken: refresh is String && refresh.isNotEmpty ? refresh : null,
);
}