mirror of
https://github.com/bitwarden/server.git
synced 2025-07-13 13:47:30 -05:00
[SM-501] Add support for revoking access tokens (#2692)
* Add support for revoking access tokens
This commit is contained in:
@ -0,0 +1,23 @@
|
||||
CREATE PROCEDURE [dbo].[ApiKey_DeleteByIds]
|
||||
@Ids [dbo].[GuidIdArray] READONLY
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
DECLARE @BatchSize INT = 100
|
||||
|
||||
WHILE @BatchSize > 0
|
||||
BEGIN
|
||||
BEGIN TRANSACTION ApiKey_DeleteMany
|
||||
|
||||
DELETE TOP(@BatchSize) AK
|
||||
FROM
|
||||
[dbo].[ApiKey] AK
|
||||
INNER JOIN
|
||||
@Ids I ON I.Id = AK.Id
|
||||
|
||||
SET @BatchSize = @@ROWCOUNT
|
||||
|
||||
COMMIT TRANSACTION ApiKey_DeleteMany
|
||||
END
|
||||
END
|
@ -444,6 +444,7 @@
|
||||
<Build Include="dbo\Views\UserView.sql" />
|
||||
<Build Include="SecretsManager\dbo\Stored Procedures\ApiKey\ApiKeyDetails_ReadById.sql" />
|
||||
<Build Include="SecretsManager\dbo\Stored Procedures\ApiKey\ApiKey_Create.sql" />
|
||||
<Build Include="SecretsManager\dbo\Stored Procedures\ApiKey\ApiKey_DeleteByIds.sql" />
|
||||
<Build Include="SecretsManager\dbo\Stored Procedures\ApiKey\ApiKey_ReadByServiceAccountId.sql" />
|
||||
<Build Include="SecretsManager\dbo\Tables\AccessPolicy.sql" />
|
||||
<Build Include="SecretsManager\dbo\Tables\ApiKey.sql" />
|
||||
|
Reference in New Issue
Block a user