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