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;