1
0
forked from baron/baron-sso

gateway 분리 아키텍처

This commit is contained in:
Lectom C Han
2026-01-30 17:55:43 +09:00
parent b39789dbe2
commit 03a78d75ae
2 changed files with 50 additions and 10 deletions

View File

@@ -52,6 +52,23 @@ class AuthProxyService {
}
}
static Future<int> getSessionStatus({String? token, bool useCookie = false}) async {
final url = Uri.parse('$_baseUrl/api/v1/user/me');
final client = createHttpClient(withCredentials: useCookie);
try {
final headers = <String, String>{
'Content-Type': 'application/json',
};
if (!useCookie && token != null && token.isNotEmpty) {
headers['Authorization'] = 'Bearer $token';
}
final response = await client.get(url, headers: headers);
return response.statusCode;
} finally {
client.close();
}
}
static Future<Map<String, dynamic>> initEnchantedLink(
String loginId, {
String? method,