Id Stores from db
Some checks failed
Dotnet build and test / log-the-inputs (push) Failing after 2s
Dotnet build and test / build (push) Failing after 2s

This commit is contained in:
Paul Schneider
2025-08-24 16:07:53 +01:00
parent 34e028e6d1
commit 0ca4259451
23 changed files with 2934 additions and 233 deletions

View File

@ -123,32 +123,7 @@ namespace isnd.tests
TestClientId = "testClientId";
TestingUser = await dbContext.Users.FirstOrDefaultAsync(u => u.UserName == TestingUserName);
EnsureUser(TestingUserName, TestingUserPassword);
// ensure a client
var testClient = await dbContext.Client.FirstOrDefaultAsync((c) => c.Id == TestClientId);
if (testClient == null)
{
testClient = new Yavsc.Models.Auth.Client
{
Id = TestClientId,
DisplayName = "Testing Client",
Secret = TestClientSecret,
Active = true,
Type = ApplicationTypes.NativeConfidential,
AccessTokenLifetime = 900,
RefreshTokenLifeTime = 15000
};
dbContext.Client.Add(testClient);
dbContext.SaveChanges();
}
else
{
testClient.DisplayName = "Testing Client";
testClient.Secret = TestClientSecret;
testClient.Active = true;
testClient.Type = ApplicationTypes.NativeConfidential;
testClient.AccessTokenLifetime = 900;
testClient.RefreshTokenLifeTime = 1500;
}
}
public void EnsureUser(string testingUserName, string password)