Files
caliverse_server/BrokerApiTest/Jwt/SSOTests.cs
2025-05-01 07:20:41 +09:00

49 lines
1.7 KiB
C#

// using ServerCommon;
// using ServerCore; using ServerBase;
// using Services;
//
// namespace BrokerTest.Jwt;
// public class SsoTests
// {
// private readonly ServerConfig m_server_config;
// private readonly string m_web_portal_token_secret;
// private readonly string m_account_db;
//
// public SsoTests()
// {
// Log.NLogFileName = "./TestConfig/nlog-BrokerApiServer.config";
// Log.initLog("BrokerApiServerTest", "Developer");
// var path = "./TestConfig/ServerConfig-Local.json";
// var full_path = Path.GetFullPath(path);
// m_server_config = new ServerConfig();
// m_server_config.setConfigFilePath(full_path);
// m_server_config.loadConfig();
// m_account_db = m_server_config.AccountNftDb;
// m_web_portal_token_secret = m_server_config.SsoAccountAuthJwtSecretKey;
// }
//
// private async Task findTestAccount()
// {
// var sso_account_auth = new WebPortalTokenAuthService(m_account_db, m_web_portal_token_secret);
// var result = await sso_account_auth.mysqlAuthWithEmail("tenafter71@gmail.com", 1);
// Assert.True(result.isSuccess());
// // m_account_id = result.getAccountId();
// }
//
// [Fact]
// public async Task ssoFailTest()
// {
// var sso_account_auth = new WebPortalTokenAuthService(m_account_db, m_web_portal_token_secret);
// var result = await sso_account_auth.mysqlAuthWithEmail("test", 1);
// Assert.True(result.isFail());
// }
//
// [Fact]
// public async Task ssoSuccessTest()
// {
// var sso_account_auth = new WebPortalTokenAuthService(m_account_db, m_web_portal_token_secret);
// var result = await sso_account_auth.mysqlAuthWithEmail("test@test.com", 1);
// Assert.True(result.isSuccess());
// }
// }