1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

[BEEEP][SM-893] Add the ability to run SM integration tests as a service account (#3187)

* Add the ability to run SM integration tests as a service account
This commit is contained in:
Thomas Avery
2024-03-29 11:00:30 -05:00
committed by GitHub
parent e2cb406a95
commit 97c4d839e0
12 changed files with 369 additions and 306 deletions

View File

@ -64,4 +64,13 @@ public class ApiApplicationFactory : WebApplicationFactoryBase<Startup>
base.Dispose(disposing);
SqliteConnection.Dispose();
}
/// <summary>
/// Helper for logging in via client secret.
/// Currently used for Secrets Manager service accounts
/// </summary>
public async Task<string> LoginWithClientSecretAsync(Guid clientId, string clientSecret)
{
return await _identityApplicationFactory.TokenFromAccessTokenAsync(clientId, clientSecret);
}
}