forked from baron/baron-sso
권한 동의 거부 api 호출 함수 추가
This commit is contained in:
@@ -261,6 +261,26 @@ class AuthProxyService {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<Map<String, dynamic>> rejectConsent(String consentChallenge) async {
|
||||
final url = Uri.parse('$_baseUrl/api/v1/auth/consent/reject');
|
||||
final body = <String, dynamic>{
|
||||
'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<Map<String, dynamic>> acceptOidcLogin(
|
||||
String loginChallenge, {
|
||||
String? token,
|
||||
|
||||
Reference in New Issue
Block a user