From f290500effef76d3922f956f84903233fe0b9883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=EC=98=81?= Date: Wed, 1 Jul 2026 14:37:36 +0900 Subject: [PATCH] =?UTF-8?q?RefreshTokenDestroyed=20=EC=BD=9C=EB=B0=B1=20?= =?UTF-8?q?=EB=AA=85=EC=B9=AD=20=EC=88=98=EC=A0=95,=20LicenseCheckInterval?= =?UTF-8?q?=20=EC=B5=9C=EC=86=9F=EA=B0=92=20=EB=B2=84=EA=B7=B8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20=EB=B0=8F=20=EB=B6=88=ED=95=84=EC=9A=94=20using=20?= =?UTF-8?q?=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- BaronSoftware.SSO.Sample/MainWindow.xaml.cs | 5 ++++- BaronSoftware.SSO/BaronSSO.cs | 4 +--- BaronSoftware.SSO/BaronSSOOption.cs | 12 ++++++------ BaronSoftware.SSO/BaronSoftware.SSO.csproj | 1 + BaronSoftware.SSO/Exceptions/InvalidUserException.cs | 8 +------- .../Exceptions/UserJsonParsingException.cs | 8 +------- BaronSoftware.SSO/GlobalConfigs.cs | 1 - BaronSoftware.SSO/Models/UserInfo.cs | 4 ---- 8 files changed, 14 insertions(+), 29 deletions(-) diff --git a/BaronSoftware.SSO.Sample/MainWindow.xaml.cs b/BaronSoftware.SSO.Sample/MainWindow.xaml.cs index 942a22d..8bfa1ff 100644 --- a/BaronSoftware.SSO.Sample/MainWindow.xaml.cs +++ b/BaronSoftware.SSO.Sample/MainWindow.xaml.cs @@ -1,4 +1,7 @@ using BaronSoftware.Auth.Sample; +using Microsoft.VisualBasic; +using System.ComponentModel; +using System.Runtime.Serialization; using System.Text; using System.Text.Json; using System.Text.Json.Nodes; @@ -27,7 +30,7 @@ namespace BaronSoftware.SSO.Sample RedirectUri = _settings.Oidc.RedirectUri, ExtraUserValidator = new SimpleUserValidator(), LicenseCheckInterval = 15, - ExpiredToken = () => { MessageBox.Show("토큰이 끊겼습니다. 다시 로그인 하세요"); }, + RefreshTokenDestroyed = () => { MessageBox.Show("토큰이 끊겼습니다. 다시 로그인 하세요"); }, }; _license = new BaronSSO(option); diff --git a/BaronSoftware.SSO/BaronSSO.cs b/BaronSoftware.SSO/BaronSSO.cs index 363a7d0..de4cc07 100644 --- a/BaronSoftware.SSO/BaronSSO.cs +++ b/BaronSoftware.SSO/BaronSSO.cs @@ -1,7 +1,5 @@ using FluentScheduler; -using System.ComponentModel; using System.Net.Http; -using System.Net.NetworkInformation; namespace BaronSoftware.SSO { @@ -181,7 +179,7 @@ namespace BaronSoftware.SSO { StopLicenseInterval(); await SignOutAsync(); - option.ExpiredToken?.Invoke(); + option.RefreshTokenDestroyed?.Invoke(); } }, run => run.Every(option.LicenseCheckInterval).Seconds() ); diff --git a/BaronSoftware.SSO/BaronSSOOption.cs b/BaronSoftware.SSO/BaronSSOOption.cs index f8f066d..61068e3 100644 --- a/BaronSoftware.SSO/BaronSSOOption.cs +++ b/BaronSoftware.SSO/BaronSSOOption.cs @@ -1,5 +1,4 @@ -using System.ComponentModel.Design.Serialization; -using System.Globalization; +using System.Globalization; namespace BaronSoftware.SSO { @@ -62,13 +61,14 @@ namespace BaronSoftware.SSO get => licenseCheckInterval; set { - if (value < 15) - licenseCheckInterval = 15; - licenseCheckInterval = value; + if (value < 30) + licenseCheckInterval = 30; + else + licenseCheckInterval = value; } } - public Action ExpiredToken { get; set; } + public Action RefreshTokenDestroyed { get; set; } } } diff --git a/BaronSoftware.SSO/BaronSoftware.SSO.csproj b/BaronSoftware.SSO/BaronSoftware.SSO.csproj index b6d499b..2150b8c 100644 --- a/BaronSoftware.SSO/BaronSoftware.SSO.csproj +++ b/BaronSoftware.SSO/BaronSoftware.SSO.csproj @@ -5,6 +5,7 @@ enable enable true + True diff --git a/BaronSoftware.SSO/Exceptions/InvalidUserException.cs b/BaronSoftware.SSO/Exceptions/InvalidUserException.cs index 212bd91..cd7bba9 100644 --- a/BaronSoftware.SSO/Exceptions/InvalidUserException.cs +++ b/BaronSoftware.SSO/Exceptions/InvalidUserException.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace BaronSoftware.SSO +namespace BaronSoftware.SSO { public class InvalidUserException : Exception { diff --git a/BaronSoftware.SSO/Exceptions/UserJsonParsingException.cs b/BaronSoftware.SSO/Exceptions/UserJsonParsingException.cs index 189be32..b98f4cd 100644 --- a/BaronSoftware.SSO/Exceptions/UserJsonParsingException.cs +++ b/BaronSoftware.SSO/Exceptions/UserJsonParsingException.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace BaronSoftware.SSO +namespace BaronSoftware.SSO { public class UserJsonParsingException : Exception { diff --git a/BaronSoftware.SSO/GlobalConfigs.cs b/BaronSoftware.SSO/GlobalConfigs.cs index 9d327b9..74d3599 100644 --- a/BaronSoftware.SSO/GlobalConfigs.cs +++ b/BaronSoftware.SSO/GlobalConfigs.cs @@ -1,5 +1,4 @@ using System.IO; - namespace BaronSoftware.SSO { internal static class GlobalConfigs diff --git a/BaronSoftware.SSO/Models/UserInfo.cs b/BaronSoftware.SSO/Models/UserInfo.cs index 115a186..d8d4d5e 100644 --- a/BaronSoftware.SSO/Models/UserInfo.cs +++ b/BaronSoftware.SSO/Models/UserInfo.cs @@ -1,8 +1,4 @@ -using Microsoft.Win32; -using System; using System.IO; -using System.Linq; -using System.Printing; using System.Security.Cryptography; using System.Text; using System.Text.Json;