From 5bb48191e893200c4d434d09a80e652b153ab35b Mon Sep 17 00:00:00 2001 From: kyy Date: Tue, 3 Feb 2026 15:03:32 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B6=8C=ED=95=9C=20=EB=8F=99=EC=9D=98=20?= =?UTF-8?q?=EA=B1=B0=EB=B6=80=20api=20=ED=98=B8=EC=B6=9C=20=ED=95=A8?= =?UTF-8?q?=EC=88=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/core/services/auth_proxy_service.dart | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/userfront/lib/core/services/auth_proxy_service.dart b/userfront/lib/core/services/auth_proxy_service.dart index 833cee12..3a71817c 100644 --- a/userfront/lib/core/services/auth_proxy_service.dart +++ b/userfront/lib/core/services/auth_proxy_service.dart @@ -261,6 +261,26 @@ class AuthProxyService { } } + static Future> rejectConsent(String consentChallenge) async { + final url = Uri.parse('$_baseUrl/api/v1/auth/consent/reject'); + final body = { + 'consent_challenge': consentChallenge, + }; + + final response = await http.post( + url, + headers: {'Content-Type': 'application/json'}, + body: jsonEncode(body), + ); + + if (response.statusCode == 200) { + return jsonDecode(response.body); + } else { + final errorBody = jsonDecode(response.body); + throw Exception(errorBody['error'] ?? 'Failed to reject consent'); + } + } + static Future> acceptOidcLogin( String loginChallenge, { String? token,