forked from baron/baron-sso
clinet id 및 요청 scope 개수 표시
This commit is contained in:
@@ -3375,13 +3375,25 @@ func (h *AuthHandler) AcceptConsentRequest(c *fiber.Ctx) error {
|
||||
|
||||
if err := c.BodyParser(&req); err != nil {
|
||||
|
||||
return fiber.NewError(fiber.StatusBadRequest, "Invalid request body")
|
||||
return fiber.NewError(fiber.StatusBadRequest, "Invalid request body")
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if reqJson, err := json.Marshal(req); err == nil {
|
||||
|
||||
if req.ConsentChallenge == "" {
|
||||
slog.Info("AcceptConsentRequest: received request body", "body", string(reqJson))
|
||||
|
||||
} else {
|
||||
|
||||
slog.Error("AcceptConsentRequest: failed to marshal request for logging", "error", err)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if req.ConsentChallenge == "" {
|
||||
|
||||
return fiber.NewError(fiber.StatusBadRequest, "consent_challenge is required")
|
||||
|
||||
|
||||
@@ -160,6 +160,7 @@ class _ConsentScreenState extends State<ConsentScreen> {
|
||||
|
||||
Widget _buildConsentCard(BuildContext context) {
|
||||
final clientName = _consentInfo?['client']?['client_name'] ?? '알 수 없는 앱';
|
||||
final clientId = _consentInfo?['client']?['client_id'] ?? '-';
|
||||
final clientLogo = _consentInfo?['client']?['logo_uri'];
|
||||
final requestedScopes = (_consentInfo?['requested_scope'] as List<dynamic>?)?.cast<String>() ?? [];
|
||||
|
||||
@@ -228,7 +229,15 @@ class _ConsentScreenState extends State<ConsentScreen> {
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
// 부가 설명이 있다면 여기에 표시 (Hydra 메타데이터 활용 가능)
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
'클라이언트 ID: $clientId',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.grey[500],
|
||||
fontFamily: 'monospace',
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -238,9 +247,22 @@ class _ConsentScreenState extends State<ConsentScreen> {
|
||||
const SizedBox(height: 32),
|
||||
|
||||
// 3. 권한 선택 영역
|
||||
const Text(
|
||||
'요청된 권한',
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const Text(
|
||||
'요청된 권한',
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
||||
),
|
||||
Text(
|
||||
'총 ${requestedScopes.length}개',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Theme.of(context).primaryColor,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
const Divider(),
|
||||
|
||||
Reference in New Issue
Block a user