Files
baron-sso-sample/BaronSoftware.SSO/BaronSSOOption.cs
최준영 1c41230021 SSO 로그아웃(RP-Initiated end_session) 구현 및 세션 쿠키 정리 보강
- BaronSSO.SignOutAsync: id_token_hint 기반 end_session 로그아웃 + 로컬 세션 정리
- SsoClient.LogoutAsync: end_session_endpoint 이동 후 post_logout 복귀를 WebView에서 가로채기
- BaronSSOOption.PostLogoutRedirectUri 추가
- LoginWindow: 쿠키 삭제를 ClearBrowsingDataAsync(완료 대기)로 변경해 재로그인 자동 SSO 통과 방지
- UserInfo: IsFamily/IsCenter 대소문자 무시 비교를 StringComparer로 수정(빌드 오류 해소)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 12:25:41 +09:00

47 lines
2.2 KiB
C#

using System.Globalization;
namespace BaronSoftware.SSO
{
public sealed class BaronSSOOption
{
public CultureInfo Culture { get; set; } = CultureInfo.InvariantCulture;
/// <summary>OIDC Issuer(서버 주소). 미지정 시 라이브러리 기본값을 사용합니다.</summary>
public string Authority { get; init; }
/// <summary>퍼블릭 클라이언트 ID. (Client Secret 없음 — PKCE 사용)</summary>
public string ClientId { get; init; }
/// <summary>
/// 콘솔에 등록된 인증 콜백 URL과 문자 그대로 일치해야 합니다.
/// 데스크톱 앱 전용 루프백 주소(127.0.0.1 + 고유 포트/경로)를 사용해
/// 웹 프론트(localhost:3000 등)와 충돌하지 않게 합니다.
/// 임베디드 WebView가 이동을 가로채므로 실제 서버는 띄울 필요가 없습니다.
/// </summary>
public string RedirectUri { get; init; }
/// <summary>
/// SSO 로그아웃(RP-Initiated Logout) 후 돌아올 주소입니다.
/// 콘솔에서 해당 클라이언트의 post_logout_redirect_uris에 동일하게 등록돼 있어야 합니다.
/// 미지정 시 SSO 서버 세션 종료는 생략하고 로컬 사용자 정보/세션 쿠키만 정리합니다.
/// (RedirectUri처럼 전용 루프백 주소 권장 — 임베디드 WebView가 복귀를 가로챕니다.)
/// </summary>
public string PostLogoutRedirectUri { get; init; }
/// <summary>
/// 인터넷이 안되는 상황에서도, refresh_token이 유효한 동안 로그인 인증을 유지할지 여부입니다. (기본값: true)
/// </summary>
public bool EnableOffline { get; set; } = true;
/// <summary>
/// 로그인 후, 로그인 인증은 Refresh token 유효기간 동안 유지합니다.
/// </summary>
public bool EnableAutoLogin { get; set; } = true;
/// <summary>
/// 사용자 인증에 대한 추가 검증이 필요한 경우, IUserValidator 인터페이스를 구현하여 Validator 속성에 할당할 수 있습니다.
/// </summary>
public required IUserValidator? Validator { get; set; }
}
}