RefreshTokenDestroyed 콜백 명칭 수정, LicenseCheckInterval 최솟값 버그 수정 및 불필요 using 정리
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
using BaronSoftware.Auth.Sample;
|
using BaronSoftware.Auth.Sample;
|
||||||
|
using Microsoft.VisualBasic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Text.Json.Nodes;
|
using System.Text.Json.Nodes;
|
||||||
@@ -27,7 +30,7 @@ namespace BaronSoftware.SSO.Sample
|
|||||||
RedirectUri = _settings.Oidc.RedirectUri,
|
RedirectUri = _settings.Oidc.RedirectUri,
|
||||||
ExtraUserValidator = new SimpleUserValidator(),
|
ExtraUserValidator = new SimpleUserValidator(),
|
||||||
LicenseCheckInterval = 15,
|
LicenseCheckInterval = 15,
|
||||||
ExpiredToken = () => { MessageBox.Show("토큰이 끊겼습니다. 다시 로그인 하세요"); },
|
RefreshTokenDestroyed = () => { MessageBox.Show("토큰이 끊겼습니다. 다시 로그인 하세요"); },
|
||||||
};
|
};
|
||||||
|
|
||||||
_license = new BaronSSO(option);
|
_license = new BaronSSO(option);
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
using FluentScheduler;
|
using FluentScheduler;
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Net.NetworkInformation;
|
|
||||||
|
|
||||||
namespace BaronSoftware.SSO
|
namespace BaronSoftware.SSO
|
||||||
{
|
{
|
||||||
@@ -181,7 +179,7 @@ namespace BaronSoftware.SSO
|
|||||||
{
|
{
|
||||||
StopLicenseInterval();
|
StopLicenseInterval();
|
||||||
await SignOutAsync();
|
await SignOutAsync();
|
||||||
option.ExpiredToken?.Invoke();
|
option.RefreshTokenDestroyed?.Invoke();
|
||||||
}
|
}
|
||||||
}, run => run.Every(option.LicenseCheckInterval).Seconds()
|
}, run => run.Every(option.LicenseCheckInterval).Seconds()
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.ComponentModel.Design.Serialization;
|
using System.Globalization;
|
||||||
using System.Globalization;
|
|
||||||
|
|
||||||
namespace BaronSoftware.SSO
|
namespace BaronSoftware.SSO
|
||||||
{
|
{
|
||||||
@@ -62,13 +61,14 @@ namespace BaronSoftware.SSO
|
|||||||
get => licenseCheckInterval;
|
get => licenseCheckInterval;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value < 15)
|
if (value < 30)
|
||||||
licenseCheckInterval = 15;
|
licenseCheckInterval = 30;
|
||||||
|
else
|
||||||
licenseCheckInterval = value;
|
licenseCheckInterval = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Action ExpiredToken { get; set; }
|
public Action RefreshTokenDestroyed { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
|
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
using System;
|
namespace BaronSoftware.SSO
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace BaronSoftware.SSO
|
|
||||||
{
|
{
|
||||||
public class InvalidUserException : Exception
|
public class InvalidUserException : Exception
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
using System;
|
namespace BaronSoftware.SSO
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace BaronSoftware.SSO
|
|
||||||
{
|
{
|
||||||
public class UserJsonParsingException : Exception
|
public class UserJsonParsingException : Exception
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace BaronSoftware.SSO
|
namespace BaronSoftware.SSO
|
||||||
{
|
{
|
||||||
internal static class GlobalConfigs
|
internal static class GlobalConfigs
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using Microsoft.Win32;
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Printing;
|
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
|||||||
Reference in New Issue
Block a user