grant_scope 파라미터 추가

This commit is contained in:
kyy
2026-02-04 15:57:32 +09:00
parent 0ac5b9ee0a
commit 40a4765dd6
@@ -238,12 +238,19 @@ class AuthProxyService {
} }
} }
static Future<Map<String, dynamic>> acceptConsent(String consentChallenge) async { static Future<Map<String, dynamic>> acceptConsent(String consentChallenge, {List<String>? grantScope}) async {
final url = Uri.parse('$_baseUrl/api/v1/auth/consent/accept'); final url = Uri.parse('$_baseUrl/api/v1/auth/consent/accept');
final body = <String, dynamic>{
'consent_challenge': consentChallenge,
};
if (grantScope != null) {
body['grant_scope'] = grantScope;
}
final response = await http.post( final response = await http.post(
url, url,
headers: {'Content-Type': 'application/json'}, headers: {'Content-Type': 'application/json'},
body: jsonEncode({'consent_challenge': consentChallenge}), body: jsonEncode(body),
); );
if (response.statusCode == 200) { if (response.statusCode == 200) {