1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-17 23:50:58 -05:00

Password re-prompt (#1269)

* Add support for password re-prompt
This commit is contained in:
Oscar Hinton
2021-04-29 15:43:44 +02:00
committed by GitHub
parent 17db94190e
commit 2054e5a926
11 changed files with 229 additions and 6 deletions

View File

@ -25,6 +25,7 @@ SELECT
THEN NULL
ELSE TRY_CONVERT(UNIQUEIDENTIFIER, JSON_VALUE(C.[Folders], CONCAT('$."', @UserId, '"')))
END [FolderId],
C.[DeletedDate]
C.[DeletedDate],
C.[Reprompt]
FROM
[dbo].[Cipher] C

View File

@ -14,7 +14,8 @@
@Edit BIT, -- not used
@ViewPassword BIT, -- not used
@OrganizationUseTotp BIT, -- not used
@DeletedDate DATETIME2(7)
@DeletedDate DATETIME2(7),
@Reprompt TINYINT
AS
BEGIN
SET NOCOUNT ON
@ -33,7 +34,8 @@ BEGIN
[Folders],
[CreationDate],
[RevisionDate],
[DeletedDate]
[DeletedDate],
[Reprompt]
)
VALUES
(
@ -46,7 +48,8 @@ BEGIN
CASE WHEN @FolderId IS NOT NULL THEN CONCAT('{', @UserIdKey, ':"', @FolderId, '"', '}') ELSE NULL END,
@CreationDate,
@RevisionDate,
@DeletedDate
@DeletedDate,
@Reprompt
)
IF @OrganizationId IS NOT NULL

View File

@ -14,7 +14,8 @@
@Edit BIT, -- not used
@ViewPassword BIT, -- not used
@OrganizationUseTotp BIT, -- not used
@DeletedDate DATETIME2(2)
@DeletedDate DATETIME2(2),
@Reprompt TINYINT
AS
BEGIN
SET NOCOUNT ON
@ -47,6 +48,7 @@ BEGIN
ELSE
JSON_MODIFY([Favorites], @UserIdPath, NULL)
END,
[Reprompt] = @Reprompt,
[CreationDate] = @CreationDate,
[RevisionDate] = @RevisionDate,
[DeletedDate] = @DeletedDate

View File

@ -1,4 +1,5 @@
CREATE TABLE [dbo].[Cipher] (

CREATE TABLE [dbo].[Cipher] (
[Id] UNIQUEIDENTIFIER NOT NULL,
[UserId] UNIQUEIDENTIFIER NULL,
[OrganizationId] UNIQUEIDENTIFIER NULL,
@ -10,6 +11,7 @@
[CreationDate] DATETIME2 (7) NOT NULL,
[RevisionDate] DATETIME2 (7) NOT NULL,
[DeletedDate] DATETIME2 (7) NULL,
[Reprompt] TINYINT NULL,
CONSTRAINT [PK_Cipher] PRIMARY KEY CLUSTERED ([Id] ASC),
CONSTRAINT [FK_Cipher_Organization] FOREIGN KEY ([OrganizationId]) REFERENCES [dbo].[Organization] ([Id]),
CONSTRAINT [FK_Cipher_User] FOREIGN KEY ([UserId]) REFERENCES [dbo].[User] ([Id])