mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-05 23:53:21 +00:00
Compare commits
42 Commits
AC-1743/Sa
...
v2024.3.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1909194d5a | ||
|
|
fc04964663 | ||
|
|
cc05bcb4a6 | ||
|
|
5ce3b01ff1 | ||
|
|
079c3ee840 | ||
|
|
f88ce25b59 | ||
|
|
599473f6e4 | ||
|
|
df389cbd08 | ||
|
|
051b6dc3cf | ||
|
|
5727dd75cc | ||
|
|
435f2d10b7 | ||
|
|
dab646675f | ||
|
|
8dc65ef371 | ||
|
|
9925fdea40 | ||
|
|
4c61498714 | ||
|
|
930f8c84d5 | ||
|
|
d20818ee49 | ||
|
|
6936c218d1 | ||
|
|
8ef5459801 | ||
|
|
cb615412aa | ||
|
|
2d69d2b791 | ||
|
|
0630b4f52e | ||
|
|
690c9cd5cb | ||
|
|
3f0454b1d8 | ||
|
|
1a84084b5d | ||
|
|
c5fb57576c | ||
|
|
165083a245 | ||
|
|
84f1f5b81f | ||
|
|
9599c66586 | ||
|
|
38b2a13df6 | ||
|
|
1fb4378046 | ||
|
|
8a661fbc5e | ||
|
|
cf56b5fb57 | ||
|
|
9c88e66a27 | ||
|
|
5b7b68f1cb | ||
|
|
a09473c632 | ||
|
|
71727dae7d | ||
|
|
3dbd34ebc3 | ||
|
|
6dd121acc6 | ||
|
|
d6ddb499f0 | ||
|
|
5b4e09be93 | ||
|
|
a48e0af042 |
BIN
.github/secrets/devid-app-cert.p12.gpg
vendored
BIN
.github/secrets/devid-app-cert.p12.gpg
vendored
Binary file not shown.
BIN
.github/secrets/devid-installer-cert.p12.gpg
vendored
BIN
.github/secrets/devid-installer-cert.p12.gpg
vendored
Binary file not shown.
BIN
.github/secrets/macdev-cert.p12.gpg
vendored
BIN
.github/secrets/macdev-cert.p12.gpg
vendored
Binary file not shown.
117
.github/workflows/build.yml
vendored
117
.github/workflows/build.yml
vendored
@@ -51,7 +51,7 @@ jobs:
|
|||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
|
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||||
with:
|
with:
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: '**/package-lock.json'
|
cache-dependency-path: '**/package-lock.json'
|
||||||
@@ -119,14 +119,14 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Upload Linux Zip to GitHub
|
- name: Upload Linux Zip to GitHub
|
||||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: bwdc-linux-${{ env._PACKAGE_VERSION }}.zip
|
name: bwdc-linux-${{ env._PACKAGE_VERSION }}.zip
|
||||||
path: ./dist-cli/bwdc-linux-${{ env._PACKAGE_VERSION }}.zip
|
path: ./dist-cli/bwdc-linux-${{ env._PACKAGE_VERSION }}.zip
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload Linux checksum to GitHub
|
- name: Upload Linux checksum to GitHub
|
||||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: bwdc-linux-sha256-${{ env._PACKAGE_VERSION }}.txt
|
name: bwdc-linux-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||||
path: ./dist-cli/bwdc-linux-sha256-${{ env._PACKAGE_VERSION }}.txt
|
path: ./dist-cli/bwdc-linux-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||||
@@ -146,7 +146,7 @@ jobs:
|
|||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
|
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||||
with:
|
with:
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: '**/package-lock.json'
|
cache-dependency-path: '**/package-lock.json'
|
||||||
@@ -207,14 +207,14 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Upload Mac Zip to GitHub
|
- name: Upload Mac Zip to GitHub
|
||||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: bwdc-macos-${{ env._PACKAGE_VERSION }}.zip
|
name: bwdc-macos-${{ env._PACKAGE_VERSION }}.zip
|
||||||
path: ./dist-cli/bwdc-macos-${{ env._PACKAGE_VERSION }}.zip
|
path: ./dist-cli/bwdc-macos-${{ env._PACKAGE_VERSION }}.zip
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload Mac checksum to GitHub
|
- name: Upload Mac checksum to GitHub
|
||||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: bwdc-macos-sha256-${{ env._PACKAGE_VERSION }}.txt
|
name: bwdc-macos-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||||
path: ./dist-cli/bwdc-macos-sha256-${{ env._PACKAGE_VERSION }}.txt
|
path: ./dist-cli/bwdc-macos-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||||
@@ -238,7 +238,7 @@ jobs:
|
|||||||
choco install reshack --no-progress
|
choco install reshack --no-progress
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
|
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||||
with:
|
with:
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: '**/package-lock.json'
|
cache-dependency-path: '**/package-lock.json'
|
||||||
@@ -351,14 +351,14 @@ jobs:
|
|||||||
-t sha256 | Out-File ./dist-cli/bwdc-windows-sha256-${env:_PACKAGE_VERSION}.txt
|
-t sha256 | Out-File ./dist-cli/bwdc-windows-sha256-${env:_PACKAGE_VERSION}.txt
|
||||||
|
|
||||||
- name: Upload Windows Zip to GitHub
|
- name: Upload Windows Zip to GitHub
|
||||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: bwdc-windows-${{ env._PACKAGE_VERSION }}.zip
|
name: bwdc-windows-${{ env._PACKAGE_VERSION }}.zip
|
||||||
path: ./dist-cli/bwdc-windows-${{ env._PACKAGE_VERSION }}.zip
|
path: ./dist-cli/bwdc-windows-${{ env._PACKAGE_VERSION }}.zip
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload Windows checksum to GitHub
|
- name: Upload Windows checksum to GitHub
|
||||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: bwdc-windows-sha256-${{ env._PACKAGE_VERSION }}.txt
|
name: bwdc-windows-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||||
path: ./dist-cli/bwdc-windows-sha256-${{ env._PACKAGE_VERSION }}.txt
|
path: ./dist-cli/bwdc-windows-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||||
@@ -378,7 +378,7 @@ jobs:
|
|||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
|
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||||
with:
|
with:
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: '**/package-lock.json'
|
cache-dependency-path: '**/package-lock.json'
|
||||||
@@ -411,28 +411,28 @@ jobs:
|
|||||||
SIGNING_CERT_NAME: ${{ secrets.SIGNING_CERT_NAME }}
|
SIGNING_CERT_NAME: ${{ secrets.SIGNING_CERT_NAME }}
|
||||||
|
|
||||||
- name: Upload Portable Executable to GitHub
|
- name: Upload Portable Executable to GitHub
|
||||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-Connector-Portable-${{ env._PACKAGE_VERSION }}.exe
|
name: Bitwarden-Connector-Portable-${{ env._PACKAGE_VERSION }}.exe
|
||||||
path: ./dist/Bitwarden-Connector-Portable-${{ env._PACKAGE_VERSION }}.exe
|
path: ./dist/Bitwarden-Connector-Portable-${{ env._PACKAGE_VERSION }}.exe
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload Installer Executable to GitHub
|
- name: Upload Installer Executable to GitHub
|
||||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-Connector-Installer-${{ env._PACKAGE_VERSION }}.exe
|
name: Bitwarden-Connector-Installer-${{ env._PACKAGE_VERSION }}.exe
|
||||||
path: ./dist/Bitwarden-Connector-Installer-${{ env._PACKAGE_VERSION }}.exe
|
path: ./dist/Bitwarden-Connector-Installer-${{ env._PACKAGE_VERSION }}.exe
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload Installer Executable Blockmap to GitHub
|
- name: Upload Installer Executable Blockmap to GitHub
|
||||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-Connector-Installer-${{ env._PACKAGE_VERSION }}.exe.blockmap
|
name: Bitwarden-Connector-Installer-${{ env._PACKAGE_VERSION }}.exe.blockmap
|
||||||
path: ./dist/Bitwarden-Connector-Installer-${{ env._PACKAGE_VERSION }}.exe.blockmap
|
path: ./dist/Bitwarden-Connector-Installer-${{ env._PACKAGE_VERSION }}.exe.blockmap
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload latest auto-update artifact
|
- name: Upload latest auto-update artifact
|
||||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: latest.yml
|
name: latest.yml
|
||||||
path: ./dist/latest.yml
|
path: ./dist/latest.yml
|
||||||
@@ -452,7 +452,7 @@ jobs:
|
|||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
|
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||||
with:
|
with:
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: '**/package-lock.json'
|
cache-dependency-path: '**/package-lock.json'
|
||||||
@@ -479,14 +479,14 @@ jobs:
|
|||||||
run: npm run dist:lin
|
run: npm run dist:lin
|
||||||
|
|
||||||
- name: Upload AppImage
|
- name: Upload AppImage
|
||||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-Connector-${{ env._PACKAGE_VERSION }}-x86_64.AppImage
|
name: Bitwarden-Connector-${{ env._PACKAGE_VERSION }}-x86_64.AppImage
|
||||||
path: ./dist/Bitwarden-Connector-${{ env._PACKAGE_VERSION }}-x86_64.AppImage
|
path: ./dist/Bitwarden-Connector-${{ env._PACKAGE_VERSION }}-x86_64.AppImage
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload latest auto-update artifact
|
- name: Upload latest auto-update artifact
|
||||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: latest-linux.yml
|
name: latest-linux.yml
|
||||||
path: ./dist/latest-linux.yml
|
path: ./dist/latest-linux.yml
|
||||||
@@ -506,7 +506,7 @@ jobs:
|
|||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
|
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||||
with:
|
with:
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: '**/package-lock.json'
|
cache-dependency-path: '**/package-lock.json'
|
||||||
@@ -523,44 +523,43 @@ jobs:
|
|||||||
npm --version
|
npm --version
|
||||||
echo "GitHub ref: $GITHUB_REF"
|
echo "GitHub ref: $GITHUB_REF"
|
||||||
echo "GitHub event: $GITHUB_EVENT"
|
echo "GitHub event: $GITHUB_EVENT"
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Decrypt secrets
|
- name: Login to Azure
|
||||||
env:
|
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
|
||||||
DECRYPT_FILE_PASSWORD: ${{ secrets.DECRYPT_FILE_PASSWORD }}
|
with:
|
||||||
shell: bash
|
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
||||||
|
|
||||||
|
- name: Get certificates
|
||||||
run: |
|
run: |
|
||||||
mkdir -p $HOME/secrets
|
mkdir -p $HOME/certificates
|
||||||
|
|
||||||
gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/devid-app-cert |
|
||||||
--output "$HOME/secrets/devid-app-cert.p12" \
|
jq -r .value | base64 -d > $HOME/certificates/devid-app-cert.p12
|
||||||
"$GITHUB_WORKSPACE/.github/secrets/devid-app-cert.p12.gpg"
|
|
||||||
|
|
||||||
gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/devid-installer-cert |
|
||||||
--output "$HOME/secrets/devid-installer-cert.p12" \
|
jq -r .value | base64 -d > $HOME/certificates/devid-installer-cert.p12
|
||||||
"$GITHUB_WORKSPACE/.github/secrets/devid-installer-cert.p12.gpg"
|
|
||||||
|
|
||||||
gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/macdev-cert |
|
||||||
--output "$HOME/secrets/macdev-cert.p12" \
|
jq -r .value | base64 -d > $HOME/certificates/macdev-cert.p12
|
||||||
"$GITHUB_WORKSPACE/.github/secrets/macdev-cert.p12.gpg"
|
|
||||||
|
|
||||||
- name: Set up keychain
|
- name: Set up keychain
|
||||||
env:
|
env:
|
||||||
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
||||||
DEVID_CERT_PASSWORD: ${{ secrets.DEVID_CERT_PASSWORD }}
|
|
||||||
MACDEV_CERT_PASSWORD: ${{ secrets.MACDEV_CERT_PASSWORD }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
security create-keychain -p $KEYCHAIN_PASSWORD build.keychain
|
security create-keychain -p $KEYCHAIN_PASSWORD build.keychain
|
||||||
security default-keychain -s build.keychain
|
security default-keychain -s build.keychain
|
||||||
security unlock-keychain -p $KEYCHAIN_PASSWORD build.keychain
|
security unlock-keychain -p $KEYCHAIN_PASSWORD build.keychain
|
||||||
security set-keychain-settings -lut 1200 build.keychain
|
security set-keychain-settings -lut 1200 build.keychain
|
||||||
security import "$HOME/secrets/devid-app-cert.p12" -k build.keychain -P $DEVID_CERT_PASSWORD \
|
|
||||||
|
security import "$HOME/certificates/devid-app-cert.p12" -k build.keychain -P "" \
|
||||||
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
||||||
security import "$HOME/secrets/devid-installer-cert.p12" -k build.keychain -P $DEVID_CERT_PASSWORD \
|
|
||||||
|
security import "$HOME/certificates/devid-installer-cert.p12" -k build.keychain -P "" \
|
||||||
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
||||||
security import "$HOME/secrets/macdev-cert.p12" -k build.keychain -P $MACDEV_CERT_PASSWORD \
|
|
||||||
|
security import "$HOME/certificates/macdev-cert.p12" -k build.keychain -P "" \
|
||||||
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
||||||
|
|
||||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $KEYCHAIN_PASSWORD build.keychain
|
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $KEYCHAIN_PASSWORD build.keychain
|
||||||
|
|
||||||
- name: Load package version
|
- name: Load package version
|
||||||
@@ -583,28 +582,28 @@ jobs:
|
|||||||
CSC_FOR_PULL_REQUEST: true
|
CSC_FOR_PULL_REQUEST: true
|
||||||
|
|
||||||
- name: Upload .zip artifact
|
- name: Upload .zip artifact
|
||||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-Connector-${{ env._PACKAGE_VERSION }}-mac.zip
|
name: Bitwarden-Connector-${{ env._PACKAGE_VERSION }}-mac.zip
|
||||||
path: ./dist/Bitwarden-Connector-${{ env._PACKAGE_VERSION }}-mac.zip
|
path: ./dist/Bitwarden-Connector-${{ env._PACKAGE_VERSION }}-mac.zip
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload .dmg artifact
|
- name: Upload .dmg artifact
|
||||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-Connector-${{ env._PACKAGE_VERSION }}.dmg
|
name: Bitwarden-Connector-${{ env._PACKAGE_VERSION }}.dmg
|
||||||
path: ./dist/Bitwarden-Connector-${{ env._PACKAGE_VERSION }}.dmg
|
path: ./dist/Bitwarden-Connector-${{ env._PACKAGE_VERSION }}.dmg
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload .dmg Blockmap artifact
|
- name: Upload .dmg Blockmap artifact
|
||||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-Connector-${{ env._PACKAGE_VERSION }}.dmg.blockmap
|
name: Bitwarden-Connector-${{ env._PACKAGE_VERSION }}.dmg.blockmap
|
||||||
path: ./dist/Bitwarden-Connector-${{ env._PACKAGE_VERSION }}.dmg.blockmap
|
path: ./dist/Bitwarden-Connector-${{ env._PACKAGE_VERSION }}.dmg.blockmap
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload latest auto-update artifact
|
- name: Upload latest auto-update artifact
|
||||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: latest-mac.yml
|
name: latest-mac.yml
|
||||||
path: ./dist/latest-mac.yml
|
path: ./dist/latest-mac.yml
|
||||||
@@ -625,37 +624,11 @@ jobs:
|
|||||||
- macos-gui
|
- macos-gui
|
||||||
steps:
|
steps:
|
||||||
- name: Check if any job failed
|
- name: Check if any job failed
|
||||||
if: ${{ (github.ref == 'refs/heads/main') || (github.ref == 'refs/heads/rc') }}
|
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc') && contains(needs.*.result, 'failure')
|
||||||
env:
|
run: exit 1
|
||||||
CLOC_STATUS: ${{ needs.cloc.result }}
|
|
||||||
SETUP_STATUS: ${{ needs.setup.result }}
|
|
||||||
LINUX_CLI_STATUS: ${{ needs.linux-cli.result }}
|
|
||||||
MACOS_CLI_STATUS: ${{ needs.macos-cli.result }}
|
|
||||||
WINDOWS_CLI_STATUS: ${{ needs.windows-cli.result }}
|
|
||||||
WINDOWS_GUI_STATUS: ${{ needs.windows-gui.result }}
|
|
||||||
LINUX_GUI_STATUS: ${{ needs.linux-gui.result }}
|
|
||||||
MACOS_GUI_STATUS: ${{ needs.macos-gui.result }}
|
|
||||||
run: |
|
|
||||||
if [ "$CLOC_STATUS" = "failure" ]; then
|
|
||||||
exit 1
|
|
||||||
elif [ "$SETUP_STATUS" = "failure" ]; then
|
|
||||||
exit 1
|
|
||||||
elif [ "$LINUX_CLI_STATUS" = "failure" ]; then
|
|
||||||
exit 1
|
|
||||||
elif [ "$MACOS_CLI_STATUS" = "failure" ]; then
|
|
||||||
exit 1
|
|
||||||
elif [ "$WINDOWS_CLI_STATUS" = "failure" ]; then
|
|
||||||
exit 1
|
|
||||||
elif [ "$WINDOWS_GUI_STATUS" = "failure" ]; then
|
|
||||||
exit 1
|
|
||||||
elif [ "$LINUX_GUI_STATUS" = "failure" ]; then
|
|
||||||
exit 1
|
|
||||||
elif [ "$MACOS_GUI_STATUS" = "failure" ]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Login to Azure - CI subscription
|
- name: Login to Azure - CI subscription
|
||||||
uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7
|
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
||||||
|
|||||||
53
.github/workflows/cleanup-rc-branch.yml
vendored
Normal file
53
.github/workflows/cleanup-rc-branch.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
---
|
||||||
|
name: Cleanup RC Branch
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- v**
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
delete-rc:
|
||||||
|
name: Delete RC Branch
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Login to Azure - CI Subscription
|
||||||
|
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
|
||||||
|
with:
|
||||||
|
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
||||||
|
|
||||||
|
- name: Retrieve bot secrets
|
||||||
|
id: retrieve-bot-secrets
|
||||||
|
uses: bitwarden/gh-actions/get-keyvault-secrets@main
|
||||||
|
with:
|
||||||
|
keyvault: bitwarden-ci
|
||||||
|
secrets: "github-pat-bitwarden-devops-bot-repo-scope"
|
||||||
|
|
||||||
|
- name: Checkout main
|
||||||
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
with:
|
||||||
|
ref: main
|
||||||
|
token: ${{ steps.retrieve-bot-secrets.outputs.github-pat-bitwarden-devops-bot-repo-scope }}
|
||||||
|
|
||||||
|
- name: Check if a RC branch exists
|
||||||
|
id: branch-check
|
||||||
|
run: |
|
||||||
|
hotfix_rc_branch_check=$(git ls-remote --heads origin hotfix-rc | wc -l)
|
||||||
|
rc_branch_check=$(git ls-remote --heads origin rc | wc -l)
|
||||||
|
|
||||||
|
if [[ "${hotfix_rc_branch_check}" -gt 0 ]]; then
|
||||||
|
echo "hotfix-rc branch exists." | tee -a $GITHUB_STEP_SUMMARY
|
||||||
|
echo "name=hotfix-rc" >> $GITHUB_OUTPUT
|
||||||
|
elif [[ "${rc_branch_check}" -gt 0 ]]; then
|
||||||
|
echo "rc branch exists." | tee -a $GITHUB_STEP_SUMMARY
|
||||||
|
echo "name=rc" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Delete RC branch
|
||||||
|
env:
|
||||||
|
BRANCH_NAME: ${{ steps.branch-check.outputs.name }}
|
||||||
|
run: |
|
||||||
|
if ! [[ -z "$BRANCH_NAME" ]]; then
|
||||||
|
git push --quiet origin --delete $BRANCH_NAME
|
||||||
|
echo "Deleted $BRANCH_NAME branch." | tee -a $GITHUB_STEP_SUMMARY
|
||||||
|
fi
|
||||||
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@@ -48,7 +48,7 @@ jobs:
|
|||||||
needs: setup
|
needs: setup
|
||||||
steps:
|
steps:
|
||||||
- name: Create GitHub deployment
|
- name: Create GitHub deployment
|
||||||
uses: chrnorm/deployment-action@d42cde7132fcec920de534fffc3be83794335c00 # v2.0.5
|
uses: chrnorm/deployment-action@55729fcebec3d284f60f5bcabbd8376437d696b1 # v2.0.7
|
||||||
id: deployment
|
id: deployment
|
||||||
with:
|
with:
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
@@ -75,7 +75,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||||
uses: ncipollo/release-action@6c75be85e571768fa31b40abf38de58ba0397db5 # v1.13.0
|
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0
|
||||||
env:
|
env:
|
||||||
PKG_VERSION: ${{ needs.setup.outputs.release-version }}
|
PKG_VERSION: ${{ needs.setup.outputs.release-version }}
|
||||||
with:
|
with:
|
||||||
@@ -104,7 +104,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Update deployment status to Success
|
- name: Update deployment status to Success
|
||||||
if: ${{ success() }}
|
if: ${{ success() }}
|
||||||
uses: chrnorm/deployment-status@2afb7d27101260f4a764219439564d954d10b5b0 # v2.0.1
|
uses: chrnorm/deployment-status@9a72af4586197112e0491ea843682b5dc280d806 # v2.0.3
|
||||||
with:
|
with:
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
state: 'success'
|
state: 'success'
|
||||||
@@ -112,7 +112,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Update deployment status to Failure
|
- name: Update deployment status to Failure
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
uses: chrnorm/deployment-status@2afb7d27101260f4a764219439564d954d10b5b0 # v2.0.1
|
uses: chrnorm/deployment-status@9a72af4586197112e0491ea843682b5dc280d806 # v2.0.3
|
||||||
with:
|
with:
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
state: 'failure'
|
state: 'failure'
|
||||||
|
|||||||
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
|||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
|
||||||
- name: Get Node Version
|
- name: Get Node Version
|
||||||
id: retrieve-node-version
|
id: retrieve-node-version
|
||||||
@@ -30,7 +30,7 @@ jobs:
|
|||||||
echo "node_version=$NODE_VERSION" >> $GITHUB_OUTPUT
|
echo "node_version=$NODE_VERSION" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
|
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||||
with:
|
with:
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: '**/package-lock.json'
|
cache-dependency-path: '**/package-lock.json'
|
||||||
|
|||||||
122
.github/workflows/version-bump.yml
vendored
122
.github/workflows/version-bump.yml
vendored
@@ -1,13 +1,12 @@
|
|||||||
---
|
---
|
||||||
name: Version Bump
|
name: Version Bump
|
||||||
run-name: Version Bump - v${{ inputs.version_number }}
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
version_number:
|
version_number_override:
|
||||||
description: "New version (example: '2024.1.0')"
|
description: "New version override (leave blank for automatic calculation, example: '2024.1.0')"
|
||||||
required: true
|
required: false
|
||||||
type: string
|
type: string
|
||||||
cut_rc_branch:
|
cut_rc_branch:
|
||||||
description: "Cut RC branch?"
|
description: "Cut RC branch?"
|
||||||
@@ -16,11 +15,34 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bump_version:
|
bump_version:
|
||||||
name: "Bump Version to v${{ inputs.version_number }}"
|
name: Bump Version
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
outputs:
|
||||||
|
version: ${{ steps.set-final-version-output.outputs.version }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Validate version input
|
||||||
|
if: ${{ inputs.version_number_override != '' }}
|
||||||
|
uses: bitwarden/gh-actions/version-check@main
|
||||||
|
with:
|
||||||
|
version: ${{ inputs.version_number_override }}
|
||||||
|
|
||||||
|
- name: Checkout Branch
|
||||||
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
with:
|
||||||
|
ref: main
|
||||||
|
|
||||||
|
- name: Check if RC branch exists
|
||||||
|
if: ${{ inputs.cut_rc_branch == true }}
|
||||||
|
run: |
|
||||||
|
remote_rc_branch_check=$(git ls-remote --heads origin rc | wc -l)
|
||||||
|
if [[ "${remote_rc_branch_check}" -gt 0 ]]; then
|
||||||
|
echo "Remote RC branch exists."
|
||||||
|
echo "Please delete current RC branch before running again."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Login to Azure - CI Subscription
|
- name: Login to Azure - CI Subscription
|
||||||
uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7
|
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
|
||||||
with:
|
with:
|
||||||
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
||||||
|
|
||||||
@@ -33,33 +55,38 @@ jobs:
|
|||||||
github-gpg-private-key-passphrase,
|
github-gpg-private-key-passphrase,
|
||||||
github-pat-bitwarden-devops-bot-repo-scope"
|
github-pat-bitwarden-devops-bot-repo-scope"
|
||||||
|
|
||||||
- name: Checkout Branch
|
|
||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
||||||
with:
|
|
||||||
ref: main
|
|
||||||
repository: bitwarden/directory-connector
|
|
||||||
|
|
||||||
- name: Import GPG key
|
- name: Import GPG key
|
||||||
uses: crazy-max/ghaction-import-gpg@82a020f1f7f605c65dd2449b392a52c3fcfef7ef # v6.0.0
|
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
|
||||||
with:
|
with:
|
||||||
gpg_private_key: ${{ steps.retrieve-secrets.outputs.github-gpg-private-key }}
|
gpg_private_key: ${{ steps.retrieve-secrets.outputs.github-gpg-private-key }}
|
||||||
passphrase: ${{ steps.retrieve-secrets.outputs.github-gpg-private-key-passphrase }}
|
passphrase: ${{ steps.retrieve-secrets.outputs.github-gpg-private-key-passphrase }}
|
||||||
git_user_signingkey: true
|
git_user_signingkey: true
|
||||||
git_commit_gpgsign: true
|
git_commit_gpgsign: true
|
||||||
|
|
||||||
|
- name: Setup git
|
||||||
|
run: |
|
||||||
|
git config --local user.email "106330231+bitwarden-devops-bot@users.noreply.github.com"
|
||||||
|
git config --local user.name "bitwarden-devops-bot"
|
||||||
|
|
||||||
- name: Create Version Branch
|
- name: Create Version Branch
|
||||||
id: create-branch
|
id: create-branch
|
||||||
run: |
|
run: |
|
||||||
NAME=version_bump_${{ github.ref_name }}_${{ inputs.version_number }}
|
NAME=version_bump_${{ github.ref_name }}_$(date +"%Y-%m-%d")
|
||||||
git switch -c $NAME
|
git switch -c $NAME
|
||||||
echo "name=$NAME" >> $GITHUB_OUTPUT
|
echo "name=$NAME" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Verify input version
|
- name: Get current version
|
||||||
env:
|
id: current-version
|
||||||
NEW_VERSION: ${{ inputs.version_number }}
|
|
||||||
run: |
|
run: |
|
||||||
CURRENT_VERSION=$(cat package.json | jq -r '.version')
|
CURRENT_VERSION=$(cat package.json | jq -r '.version')
|
||||||
|
echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Verify input version
|
||||||
|
if: ${{ inputs.version_number_override != '' }}
|
||||||
|
env:
|
||||||
|
CURRENT_VERSION: ${{ steps.current-version.outputs.version }}
|
||||||
|
NEW_VERSION: ${{ inputs.version_number_override }}
|
||||||
|
run: |
|
||||||
# Error if version has not changed.
|
# Error if version has not changed.
|
||||||
if [[ "$NEW_VERSION" == "$CURRENT_VERSION" ]]; then
|
if [[ "$NEW_VERSION" == "$CURRENT_VERSION" ]]; then
|
||||||
echo "Version has not changed."
|
echo "Version has not changed."
|
||||||
@@ -75,16 +102,37 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Bump Version - Package
|
- name: Calculate next release version
|
||||||
|
if: ${{ inputs.version_number_override == '' }}
|
||||||
|
id: calculate-next-version
|
||||||
|
uses: bitwarden/gh-actions/version-next@main
|
||||||
|
with:
|
||||||
|
version: ${{ steps.current-version.outputs.version }}
|
||||||
|
|
||||||
|
- name: Bump Version - Package - Version Override
|
||||||
|
if: ${{ inputs.version_number_override != '' }}
|
||||||
|
id: bump-version-override
|
||||||
uses: bitwarden/gh-actions/version-bump@main
|
uses: bitwarden/gh-actions/version-bump@main
|
||||||
with:
|
with:
|
||||||
version: ${{ inputs.version_number }}
|
|
||||||
file_path: "./package.json"
|
file_path: "./package.json"
|
||||||
|
version: ${{ inputs.version_number_override }}
|
||||||
|
|
||||||
- name: Setup git
|
- name: Bump Version - Package - Automatic Calculation
|
||||||
|
if: ${{ inputs.version_number_override == '' }}
|
||||||
|
id: bump-version-automatic
|
||||||
|
uses: bitwarden/gh-actions/version-bump@main
|
||||||
|
with:
|
||||||
|
file_path: "./package.json"
|
||||||
|
version: ${{ steps.calculate-next-version.outputs.version }}
|
||||||
|
|
||||||
|
- name: Set final version output
|
||||||
|
id: set-final-version-output
|
||||||
run: |
|
run: |
|
||||||
git config --local user.email "106330231+bitwarden-devops-bot@users.noreply.github.com"
|
if [[ "${{ steps.bump-version-override.outcome }}" == "success" ]]; then
|
||||||
git config --local user.name "bitwarden-devops-bot"
|
echo "version=${{ inputs.version_number_override }}" >> $GITHUB_OUTPUT
|
||||||
|
elif [[ "${{ steps.bump-version-automatic.outcome }}" == "success" ]]; then
|
||||||
|
echo "version=${{ steps.calculate-next-version.outputs.version }}" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Check if version changed
|
- name: Check if version changed
|
||||||
id: version-changed
|
id: version-changed
|
||||||
@@ -98,7 +146,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Commit files
|
- name: Commit files
|
||||||
if: ${{ steps.version-changed.outputs.changes_to_commit == 'TRUE' }}
|
if: ${{ steps.version-changed.outputs.changes_to_commit == 'TRUE' }}
|
||||||
run: git commit -m "Bumped version to ${{ inputs.version_number }}" -a
|
run: git commit -m "Bumped version to ${{ steps.set-final-version-output.outputs.version }}" -a
|
||||||
|
|
||||||
- name: Push changes
|
- name: Push changes
|
||||||
if: ${{ steps.version-changed.outputs.changes_to_commit == 'TRUE' }}
|
if: ${{ steps.version-changed.outputs.changes_to_commit == 'TRUE' }}
|
||||||
@@ -112,7 +160,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ steps.retrieve-secrets.outputs.github-pat-bitwarden-devops-bot-repo-scope }}
|
GH_TOKEN: ${{ steps.retrieve-secrets.outputs.github-pat-bitwarden-devops-bot-repo-scope }}
|
||||||
PR_BRANCH: ${{ steps.create-branch.outputs.name }}
|
PR_BRANCH: ${{ steps.create-branch.outputs.name }}
|
||||||
TITLE: "Bump version to ${{ inputs.version_number }}"
|
TITLE: "Bump version to ${{ steps.set-final-version-output.outputs.version }}"
|
||||||
run: |
|
run: |
|
||||||
PR_URL=$(gh pr create --title "$TITLE" \
|
PR_URL=$(gh pr create --title "$TITLE" \
|
||||||
--base "main" \
|
--base "main" \
|
||||||
@@ -128,16 +176,18 @@ jobs:
|
|||||||
- [X] Other
|
- [X] Other
|
||||||
|
|
||||||
## Objective
|
## Objective
|
||||||
Automated version bump to ${{ inputs.version_number }}")
|
Automated version bump to ${{ steps.set-final-version-output.outputs.version }}")
|
||||||
echo "pr_number=${PR_URL##*/}" >> $GITHUB_OUTPUT
|
echo "pr_number=${PR_URL##*/}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Approve PR
|
- name: Approve PR
|
||||||
|
if: ${{ steps.version-changed.outputs.changes_to_commit == 'TRUE' }}
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
PR_NUMBER: ${{ steps.create-pr.outputs.pr_number }}
|
PR_NUMBER: ${{ steps.create-pr.outputs.pr_number }}
|
||||||
run: gh pr review $PR_NUMBER --approve
|
run: gh pr review $PR_NUMBER --approve
|
||||||
|
|
||||||
- name: Merge PR
|
- name: Merge PR
|
||||||
|
if: ${{ steps.version-changed.outputs.changes_to_commit == 'TRUE' }}
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ steps.retrieve-secrets.outputs.github-pat-bitwarden-devops-bot-repo-scope }}
|
GH_TOKEN: ${{ steps.retrieve-secrets.outputs.github-pat-bitwarden-devops-bot-repo-scope }}
|
||||||
PR_NUMBER: ${{ steps.create-pr.outputs.pr_number }}
|
PR_NUMBER: ${{ steps.create-pr.outputs.pr_number }}
|
||||||
@@ -145,8 +195,8 @@ jobs:
|
|||||||
|
|
||||||
cut_rc:
|
cut_rc:
|
||||||
name: Cut RC branch
|
name: Cut RC branch
|
||||||
needs: bump_version
|
|
||||||
if: ${{ inputs.cut_rc_branch == true }}
|
if: ${{ inputs.cut_rc_branch == true }}
|
||||||
|
needs: bump_version
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Branch
|
- name: Checkout Branch
|
||||||
@@ -154,14 +204,20 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
ref: main
|
ref: main
|
||||||
|
|
||||||
- name: Check if RC branch exists
|
- name: Verify version has been updated
|
||||||
|
env:
|
||||||
|
NEW_VERSION: ${{ needs.bump_version.outputs.version }}
|
||||||
run: |
|
run: |
|
||||||
remote_rc_branch_check=$(git ls-remote --heads origin rc | wc -l)
|
# Wait for version to change.
|
||||||
if [[ "${remote_rc_branch_check}" -gt 0 ]]; then
|
while : ; do
|
||||||
echo "Remote RC branch exists."
|
echo "Waiting for version to be updated..."
|
||||||
echo "Please delete current RC branch before running again."
|
git pull --force
|
||||||
exit 1
|
CURRENT_VERSION=$(cat package.json | jq -r '.version')
|
||||||
fi
|
|
||||||
|
# If the versions don't match we continue the loop, otherwise we break out of the loop.
|
||||||
|
[[ "$NEW_VERSION" != "$CURRENT_VERSION" ]] || break
|
||||||
|
sleep 10
|
||||||
|
done
|
||||||
|
|
||||||
- name: Cut RC branch
|
- name: Cut RC branch
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
11
.github/workflows/workflow-linter.yml
vendored
11
.github/workflows/workflow-linter.yml
vendored
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
name: Workflow Linter
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- .github/workflows/**
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
call-workflow:
|
|
||||||
uses: bitwarden/gh-actions/.github/workflows/workflow-linter.yml@main
|
|
||||||
@@ -12,10 +12,10 @@
|
|||||||
{{ enforcedPolicyMessage }}
|
{{ enforcedPolicyMessage }}
|
||||||
<ul>
|
<ul>
|
||||||
<li *ngIf="enforcedPolicyOptions?.minComplexity > 0">
|
<li *ngIf="enforcedPolicyOptions?.minComplexity > 0">
|
||||||
{{ "policyInEffectMinComplexity" | i18n : getPasswordScoreAlertDisplay() }}
|
{{ "policyInEffectMinComplexity" | i18n: getPasswordScoreAlertDisplay() }}
|
||||||
</li>
|
</li>
|
||||||
<li *ngIf="enforcedPolicyOptions?.minLength > 0">
|
<li *ngIf="enforcedPolicyOptions?.minLength > 0">
|
||||||
{{ "policyInEffectMinLength" | i18n : enforcedPolicyOptions?.minLength.toString() }}
|
{{ "policyInEffectMinLength" | i18n: enforcedPolicyOptions?.minLength.toString() }}
|
||||||
</li>
|
</li>
|
||||||
<li *ngIf="enforcedPolicyOptions?.requireUpper">
|
<li *ngIf="enforcedPolicyOptions?.requireUpper">
|
||||||
{{ "policyInEffectUppercase" | i18n }}
|
{{ "policyInEffectUppercase" | i18n }}
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
{{ "policyInEffectNumbers" | i18n }}
|
{{ "policyInEffectNumbers" | i18n }}
|
||||||
</li>
|
</li>
|
||||||
<li *ngIf="enforcedPolicyOptions?.requireSpecial">
|
<li *ngIf="enforcedPolicyOptions?.requireSpecial">
|
||||||
{{ "policyInEffectSpecial" | i18n : "!@#$%^&*" }}
|
{{ "policyInEffectSpecial" | i18n: "!@#$%^&*" }}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export class EnvironmentComponent {
|
|||||||
constructor(
|
constructor(
|
||||||
protected platformUtilsService: PlatformUtilsService,
|
protected platformUtilsService: PlatformUtilsService,
|
||||||
protected environmentService: EnvironmentService,
|
protected environmentService: EnvironmentService,
|
||||||
protected i18nService: I18nService
|
protected i18nService: I18nService,
|
||||||
) {
|
) {
|
||||||
const urls = this.environmentService.getUrls();
|
const urls = this.environmentService.getUrls();
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,10 @@ export class IconComponent implements OnChanges {
|
|||||||
|
|
||||||
private iconsUrl: string;
|
private iconsUrl: string;
|
||||||
|
|
||||||
constructor(environmentService: EnvironmentService, private stateService: StateService) {
|
constructor(
|
||||||
|
environmentService: EnvironmentService,
|
||||||
|
private stateService: StateService,
|
||||||
|
) {
|
||||||
this.iconsUrl = environmentService.getIconsUrl();
|
this.iconsUrl = environmentService.getIconsUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export class DynamicModalComponent implements AfterViewInit, OnDestroy {
|
|||||||
private cd: ChangeDetectorRef,
|
private cd: ChangeDetectorRef,
|
||||||
private el: ElementRef<HTMLElement>,
|
private el: ElementRef<HTMLElement>,
|
||||||
private focusTrapFactory: ConfigurableFocusTrapFactory,
|
private focusTrapFactory: ConfigurableFocusTrapFactory,
|
||||||
public modalRef: ModalRef
|
public modalRef: ModalRef,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
@@ -47,7 +47,7 @@ export class DynamicModalComponent implements AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
this.modalRef.created(this.el.nativeElement);
|
this.modalRef.created(this.el.nativeElement);
|
||||||
this.focusTrap = this.focusTrapFactory.create(
|
this.focusTrap = this.focusTrapFactory.create(
|
||||||
this.el.nativeElement.querySelector(".modal-dialog")
|
this.el.nativeElement.querySelector(".modal-dialog"),
|
||||||
);
|
);
|
||||||
if (this.el.nativeElement.querySelector("[appAutoFocus]") == null) {
|
if (this.el.nativeElement.querySelector("[appAutoFocus]") == null) {
|
||||||
this.focusTrap.focusFirstTabbableElementWhenReady();
|
this.focusTrap.focusFirstTabbableElementWhenReady();
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
import { InjectFlags, InjectOptions, Injector, ProviderToken } from "@angular/core";
|
import { InjectFlags, InjectOptions, Injector, ProviderToken } from "@angular/core";
|
||||||
|
|
||||||
export class ModalInjector implements Injector {
|
export class ModalInjector implements Injector {
|
||||||
constructor(private _parentInjector: Injector, private _additionalTokens: WeakMap<any, any>) {}
|
constructor(
|
||||||
|
private _parentInjector: Injector,
|
||||||
|
private _additionalTokens: WeakMap<any, any>,
|
||||||
|
) {}
|
||||||
|
|
||||||
get<T>(
|
get<T>(
|
||||||
token: ProviderToken<T>,
|
token: ProviderToken<T>,
|
||||||
notFoundValue: undefined,
|
notFoundValue: undefined,
|
||||||
options: InjectOptions & { optional?: false }
|
options: InjectOptions & { optional?: false },
|
||||||
): T;
|
): T;
|
||||||
get<T>(token: ProviderToken<T>, notFoundValue: null, options: InjectOptions): T;
|
get<T>(token: ProviderToken<T>, notFoundValue: null, options: InjectOptions): T;
|
||||||
get<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions | InjectFlags): T;
|
get<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions | InjectFlags): T;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export class PasswordRepromptComponent {
|
|||||||
private modalRef: ModalRef,
|
private modalRef: ModalRef,
|
||||||
private cryptoService: CryptoService,
|
private cryptoService: CryptoService,
|
||||||
private platformUtilsService: PlatformUtilsService,
|
private platformUtilsService: PlatformUtilsService,
|
||||||
private i18nService: I18nService
|
private i18nService: I18nService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
togglePassword() {
|
togglePassword() {
|
||||||
@@ -31,7 +31,7 @@ export class PasswordRepromptComponent {
|
|||||||
this.platformUtilsService.showToast(
|
this.platformUtilsService.showToast(
|
||||||
"error",
|
"error",
|
||||||
this.i18nService.t("errorOccurred"),
|
this.i18nService.t("errorOccurred"),
|
||||||
this.i18nService.t("invalidMasterPassword")
|
this.i18nService.t("invalidMasterPassword"),
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,10 @@ import {
|
|||||||
preserveWhitespaces: false,
|
preserveWhitespaces: false,
|
||||||
})
|
})
|
||||||
export class BitwardenToast extends BaseToast {
|
export class BitwardenToast extends BaseToast {
|
||||||
constructor(protected toastrService: ToastrService, public toastPackage: ToastPackage) {
|
constructor(
|
||||||
|
protected toastrService: ToastrService,
|
||||||
|
public toastPackage: ToastPackage,
|
||||||
|
) {
|
||||||
super(toastrService, toastPackage);
|
super(toastrService, toastPackage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,10 @@ export class A11yTitleDirective {
|
|||||||
|
|
||||||
private title: string;
|
private title: string;
|
||||||
|
|
||||||
constructor(private el: ElementRef, private renderer: Renderer2) {}
|
constructor(
|
||||||
|
private el: ElementRef,
|
||||||
|
private renderer: Renderer2,
|
||||||
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if (!this.el.nativeElement.hasAttribute("title")) {
|
if (!this.el.nativeElement.hasAttribute("title")) {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export class ApiActionDirective implements OnChanges {
|
|||||||
constructor(
|
constructor(
|
||||||
private el: ElementRef,
|
private el: ElementRef,
|
||||||
private validationService: ValidationService,
|
private validationService: ValidationService,
|
||||||
private logService: LogService
|
private logService: LogService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnChanges(changes: any) {
|
ngOnChanges(changes: any) {
|
||||||
@@ -43,7 +43,7 @@ export class ApiActionDirective implements OnChanges {
|
|||||||
}
|
}
|
||||||
this.logService?.error(`Received API exception: ${e}`);
|
this.logService?.error(`Received API exception: ${e}`);
|
||||||
this.validationService.showError(e);
|
this.validationService.showError(e);
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,10 @@ export class AutofocusDirective {
|
|||||||
|
|
||||||
private autofocus: boolean;
|
private autofocus: boolean;
|
||||||
|
|
||||||
constructor(private el: ElementRef, private ngZone: NgZone) {}
|
constructor(
|
||||||
|
private el: ElementRef,
|
||||||
|
private ngZone: NgZone,
|
||||||
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if (!Utils.isMobileBrowser && this.autofocus) {
|
if (!Utils.isMobileBrowser && this.autofocus) {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export class BoxRowDirective implements OnInit {
|
|||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.formEls = Array.from(
|
this.formEls = Array.from(
|
||||||
this.el.querySelectorAll('input:not([type="hidden"]), select, textarea')
|
this.el.querySelectorAll('input:not([type="hidden"]), select, textarea'),
|
||||||
);
|
);
|
||||||
this.formEls.forEach((formEl) => {
|
this.formEls.forEach((formEl) => {
|
||||||
formEl.addEventListener(
|
formEl.addEventListener(
|
||||||
@@ -21,7 +21,7 @@ export class BoxRowDirective implements OnInit {
|
|||||||
() => {
|
() => {
|
||||||
this.el.classList.add("active");
|
this.el.classList.add("active");
|
||||||
},
|
},
|
||||||
false
|
false,
|
||||||
);
|
);
|
||||||
|
|
||||||
formEl.addEventListener(
|
formEl.addEventListener(
|
||||||
@@ -29,7 +29,7 @@ export class BoxRowDirective implements OnInit {
|
|||||||
() => {
|
() => {
|
||||||
this.el.classList.remove("active");
|
this.el.classList.remove("active");
|
||||||
},
|
},
|
||||||
false
|
false,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ $icomoon-font-path: "/jslib/angular/src/scss/bwicons/fonts/" !default;
|
|||||||
// New font sheet? Update the font-face information below
|
// New font sheet? Update the font-face information below
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "#{$icomoon-font-family}";
|
font-family: "#{$icomoon-font-family}";
|
||||||
src: url($icomoon-font-path + "bwi-font.svg") format("svg"),
|
src:
|
||||||
|
url($icomoon-font-path + "bwi-font.svg") format("svg"),
|
||||||
url($icomoon-font-path + "bwi-font.ttf") format("truetype"),
|
url($icomoon-font-path + "bwi-font.ttf") format("truetype"),
|
||||||
url($icomoon-font-path + "bwi-font.woff") format("woff"),
|
url($icomoon-font-path + "bwi-font.woff") format("woff"),
|
||||||
url($icomoon-font-path + "bwi-font.woff2") format("woff2");
|
url($icomoon-font-path + "bwi-font.woff2") format("woff2");
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Injectable } from "@angular/core";
|
import { Injectable } from "@angular/core";
|
||||||
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from "@angular/router";
|
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot } from "@angular/router";
|
||||||
|
|
||||||
import { KeyConnectorService } from "@/jslib/common/src/abstractions/keyConnector.service";
|
import { KeyConnectorService } from "@/jslib/common/src/abstractions/keyConnector.service";
|
||||||
import { MessagingService } from "@/jslib/common/src/abstractions/messaging.service";
|
import { MessagingService } from "@/jslib/common/src/abstractions/messaging.service";
|
||||||
@@ -7,13 +7,13 @@ import { StateService } from "@/jslib/common/src/abstractions/state.service";
|
|||||||
import { VaultTimeoutService } from "@/jslib/common/src/abstractions/vaultTimeout.service";
|
import { VaultTimeoutService } from "@/jslib/common/src/abstractions/vaultTimeout.service";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AuthGuardService implements CanActivate {
|
export class AuthGuardService {
|
||||||
constructor(
|
constructor(
|
||||||
private vaultTimeoutService: VaultTimeoutService,
|
private vaultTimeoutService: VaultTimeoutService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private messagingService: MessagingService,
|
private messagingService: MessagingService,
|
||||||
private keyConnectorService: KeyConnectorService,
|
private keyConnectorService: KeyConnectorService,
|
||||||
private stateService: StateService
|
private stateService: StateService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async canActivate(route: ActivatedRouteSnapshot, routerState: RouterStateSnapshot) {
|
async canActivate(route: ActivatedRouteSnapshot, routerState: RouterStateSnapshot) {
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ import { ValidationService } from "./validation.service";
|
|||||||
i18nService: I18nServiceAbstraction,
|
i18nService: I18nServiceAbstraction,
|
||||||
injector: Injector,
|
injector: Injector,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
stateService: StateServiceAbstraction
|
stateService: StateServiceAbstraction,
|
||||||
) =>
|
) =>
|
||||||
new CipherService(
|
new CipherService(
|
||||||
cryptoService,
|
cryptoService,
|
||||||
@@ -141,7 +141,7 @@ import { ValidationService } from "./validation.service";
|
|||||||
i18nService,
|
i18nService,
|
||||||
() => injector.get(SearchServiceAbstraction),
|
() => injector.get(SearchServiceAbstraction),
|
||||||
logService,
|
logService,
|
||||||
stateService
|
stateService,
|
||||||
),
|
),
|
||||||
deps: [
|
deps: [
|
||||||
CryptoServiceAbstraction,
|
CryptoServiceAbstraction,
|
||||||
@@ -209,14 +209,14 @@ import { ValidationService } from "./validation.service";
|
|||||||
platformUtilsService: PlatformUtilsServiceAbstraction,
|
platformUtilsService: PlatformUtilsServiceAbstraction,
|
||||||
environmentService: EnvironmentServiceAbstraction,
|
environmentService: EnvironmentServiceAbstraction,
|
||||||
messagingService: MessagingServiceAbstraction,
|
messagingService: MessagingServiceAbstraction,
|
||||||
appIdService: AppIdServiceAbstraction
|
appIdService: AppIdServiceAbstraction,
|
||||||
) =>
|
) =>
|
||||||
new ApiService(
|
new ApiService(
|
||||||
tokenService,
|
tokenService,
|
||||||
platformUtilsService,
|
platformUtilsService,
|
||||||
environmentService,
|
environmentService,
|
||||||
appIdService,
|
appIdService,
|
||||||
async (expired: boolean) => messagingService.send("logout", { expired: expired })
|
async (expired: boolean) => messagingService.send("logout", { expired: expired }),
|
||||||
),
|
),
|
||||||
deps: [
|
deps: [
|
||||||
TokenServiceAbstraction,
|
TokenServiceAbstraction,
|
||||||
@@ -247,7 +247,7 @@ import { ValidationService } from "./validation.service";
|
|||||||
keyConnectorService: KeyConnectorServiceAbstraction,
|
keyConnectorService: KeyConnectorServiceAbstraction,
|
||||||
stateService: StateServiceAbstraction,
|
stateService: StateServiceAbstraction,
|
||||||
organizationService: OrganizationServiceAbstraction,
|
organizationService: OrganizationServiceAbstraction,
|
||||||
providerService: ProviderServiceAbstraction
|
providerService: ProviderServiceAbstraction,
|
||||||
) =>
|
) =>
|
||||||
new SyncService(
|
new SyncService(
|
||||||
apiService,
|
apiService,
|
||||||
@@ -264,7 +264,7 @@ import { ValidationService } from "./validation.service";
|
|||||||
stateService,
|
stateService,
|
||||||
organizationService,
|
organizationService,
|
||||||
providerService,
|
providerService,
|
||||||
async (expired: boolean) => messagingService.send("logout", { expired: expired })
|
async (expired: boolean) => messagingService.send("logout", { expired: expired }),
|
||||||
),
|
),
|
||||||
deps: [
|
deps: [
|
||||||
ApiServiceAbstraction,
|
ApiServiceAbstraction,
|
||||||
@@ -302,7 +302,7 @@ import { ValidationService } from "./validation.service";
|
|||||||
tokenService: TokenServiceAbstraction,
|
tokenService: TokenServiceAbstraction,
|
||||||
policyService: PolicyServiceAbstraction,
|
policyService: PolicyServiceAbstraction,
|
||||||
keyConnectorService: KeyConnectorServiceAbstraction,
|
keyConnectorService: KeyConnectorServiceAbstraction,
|
||||||
stateService: StateServiceAbstraction
|
stateService: StateServiceAbstraction,
|
||||||
) =>
|
) =>
|
||||||
new VaultTimeoutService(
|
new VaultTimeoutService(
|
||||||
cipherService,
|
cipherService,
|
||||||
@@ -318,7 +318,7 @@ import { ValidationService } from "./validation.service";
|
|||||||
stateService,
|
stateService,
|
||||||
null,
|
null,
|
||||||
async (userId?: string) =>
|
async (userId?: string) =>
|
||||||
messagingService.send("logout", { expired: false, userId: userId })
|
messagingService.send("logout", { expired: false, userId: userId }),
|
||||||
),
|
),
|
||||||
deps: [
|
deps: [
|
||||||
CipherServiceAbstraction,
|
CipherServiceAbstraction,
|
||||||
@@ -340,14 +340,14 @@ import { ValidationService } from "./validation.service";
|
|||||||
storageService: StorageServiceAbstraction,
|
storageService: StorageServiceAbstraction,
|
||||||
secureStorageService: StorageServiceAbstraction,
|
secureStorageService: StorageServiceAbstraction,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
stateMigrationService: StateMigrationServiceAbstraction
|
stateMigrationService: StateMigrationServiceAbstraction,
|
||||||
) =>
|
) =>
|
||||||
new StateService(
|
new StateService(
|
||||||
storageService,
|
storageService,
|
||||||
secureStorageService,
|
secureStorageService,
|
||||||
logService,
|
logService,
|
||||||
stateMigrationService,
|
stateMigrationService,
|
||||||
new StateFactory(GlobalState, Account)
|
new StateFactory(GlobalState, Account),
|
||||||
),
|
),
|
||||||
deps: [
|
deps: [
|
||||||
StorageServiceAbstraction,
|
StorageServiceAbstraction,
|
||||||
@@ -360,12 +360,12 @@ import { ValidationService } from "./validation.service";
|
|||||||
provide: StateMigrationServiceAbstraction,
|
provide: StateMigrationServiceAbstraction,
|
||||||
useFactory: (
|
useFactory: (
|
||||||
storageService: StorageServiceAbstraction,
|
storageService: StorageServiceAbstraction,
|
||||||
secureStorageService: StorageServiceAbstraction
|
secureStorageService: StorageServiceAbstraction,
|
||||||
) =>
|
) =>
|
||||||
new StateMigrationService(
|
new StateMigrationService(
|
||||||
storageService,
|
storageService,
|
||||||
secureStorageService,
|
secureStorageService,
|
||||||
new StateFactory(GlobalState, Account)
|
new StateFactory(GlobalState, Account),
|
||||||
),
|
),
|
||||||
deps: [StorageServiceAbstraction, "SECURE_STORAGE"],
|
deps: [StorageServiceAbstraction, "SECURE_STORAGE"],
|
||||||
},
|
},
|
||||||
@@ -384,7 +384,7 @@ import { ValidationService } from "./validation.service";
|
|||||||
environmentService: EnvironmentServiceAbstraction,
|
environmentService: EnvironmentServiceAbstraction,
|
||||||
messagingService: MessagingServiceAbstraction,
|
messagingService: MessagingServiceAbstraction,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
stateService: StateServiceAbstraction
|
stateService: StateServiceAbstraction,
|
||||||
) =>
|
) =>
|
||||||
new NotificationsService(
|
new NotificationsService(
|
||||||
syncService,
|
syncService,
|
||||||
@@ -394,7 +394,7 @@ import { ValidationService } from "./validation.service";
|
|||||||
environmentService,
|
environmentService,
|
||||||
async () => messagingService.send("logout", { expired: true }),
|
async () => messagingService.send("logout", { expired: true }),
|
||||||
logService,
|
logService,
|
||||||
stateService
|
stateService,
|
||||||
),
|
),
|
||||||
deps: [
|
deps: [
|
||||||
SyncServiceAbstraction,
|
SyncServiceAbstraction,
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
import { Injectable } from "@angular/core";
|
import { Injectable } from "@angular/core";
|
||||||
import { CanActivate, Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
|
|
||||||
import { StateService } from "@/jslib/common/src/abstractions/state.service";
|
import { StateService } from "@/jslib/common/src/abstractions/state.service";
|
||||||
import { VaultTimeoutService } from "@/jslib/common/src/abstractions/vaultTimeout.service";
|
import { VaultTimeoutService } from "@/jslib/common/src/abstractions/vaultTimeout.service";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class LockGuardService implements CanActivate {
|
export class LockGuardService {
|
||||||
protected homepage = "vault";
|
protected homepage = "vault";
|
||||||
protected loginpage = "login";
|
protected loginpage = "login";
|
||||||
constructor(
|
constructor(
|
||||||
private vaultTimeoutService: VaultTimeoutService,
|
private vaultTimeoutService: VaultTimeoutService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private stateService: StateService
|
private stateService: StateService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async canActivate() {
|
async canActivate() {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export class ModalService {
|
|||||||
constructor(
|
constructor(
|
||||||
private componentFactoryResolver: ComponentFactoryResolver,
|
private componentFactoryResolver: ComponentFactoryResolver,
|
||||||
private applicationRef: ApplicationRef,
|
private applicationRef: ApplicationRef,
|
||||||
private injector: Injector
|
private injector: Injector,
|
||||||
) {
|
) {
|
||||||
document.addEventListener("keyup", (event) => {
|
document.addEventListener("keyup", (event) => {
|
||||||
if (event.key === "Escape" && this.modalCount > 0) {
|
if (event.key === "Escape" && this.modalCount > 0) {
|
||||||
@@ -51,7 +51,7 @@ export class ModalService {
|
|||||||
async openViewRef<T>(
|
async openViewRef<T>(
|
||||||
componentType: Type<T>,
|
componentType: Type<T>,
|
||||||
viewContainerRef: ViewContainerRef,
|
viewContainerRef: ViewContainerRef,
|
||||||
setComponentParameters: (component: T) => void = null
|
setComponentParameters: (component: T) => void = null,
|
||||||
): Promise<[ModalRef, T]> {
|
): Promise<[ModalRef, T]> {
|
||||||
const [modalRef, modalComponentRef] = this.openInternal(componentType, null, false);
|
const [modalRef, modalComponentRef] = this.openInternal(componentType, null, false);
|
||||||
modalComponentRef.instance.setComponentParameters = setComponentParameters;
|
modalComponentRef.instance.setComponentParameters = setComponentParameters;
|
||||||
@@ -76,7 +76,7 @@ export class ModalService {
|
|||||||
|
|
||||||
registerComponentFactoryResolver<T>(
|
registerComponentFactoryResolver<T>(
|
||||||
componentType: Type<T>,
|
componentType: Type<T>,
|
||||||
componentFactoryResolver: ComponentFactoryResolver
|
componentFactoryResolver: ComponentFactoryResolver,
|
||||||
): void {
|
): void {
|
||||||
this.factoryResolvers.set(componentType, componentFactoryResolver);
|
this.factoryResolvers.set(componentType, componentFactoryResolver);
|
||||||
}
|
}
|
||||||
@@ -92,7 +92,7 @@ export class ModalService {
|
|||||||
protected openInternal(
|
protected openInternal(
|
||||||
componentType: Type<any>,
|
componentType: Type<any>,
|
||||||
config?: ModalConfig,
|
config?: ModalConfig,
|
||||||
attachToDom?: boolean
|
attachToDom?: boolean,
|
||||||
): [ModalRef, ComponentRef<DynamicModalComponent>] {
|
): [ModalRef, ComponentRef<DynamicModalComponent>] {
|
||||||
const [modalRef, componentRef] = this.createModalComponent(config);
|
const [modalRef, componentRef] = this.createModalComponent(config);
|
||||||
componentRef.instance.childComponentType = componentType;
|
componentRef.instance.childComponentType = componentType;
|
||||||
@@ -143,7 +143,7 @@ export class ModalService {
|
|||||||
dialogEl.style.zIndex = `${this.modalCount}050`;
|
dialogEl.style.zIndex = `${this.modalCount}050`;
|
||||||
|
|
||||||
const modals = Array.from(
|
const modals = Array.from(
|
||||||
el.querySelectorAll('.modal-backdrop, .modal *[data-dismiss="modal"]')
|
el.querySelectorAll('.modal-backdrop, .modal *[data-dismiss="modal"]'),
|
||||||
);
|
);
|
||||||
for (const closeElement of modals) {
|
for (const closeElement of modals) {
|
||||||
closeElement.addEventListener("click", () => {
|
closeElement.addEventListener("click", () => {
|
||||||
@@ -163,7 +163,7 @@ export class ModalService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected createModalComponent(
|
protected createModalComponent(
|
||||||
config: ModalConfig
|
config: ModalConfig,
|
||||||
): [ModalRef, ComponentRef<DynamicModalComponent>] {
|
): [ModalRef, ComponentRef<DynamicModalComponent>] {
|
||||||
const modalRef = new ModalRef();
|
const modalRef = new ModalRef();
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export class PasswordRepromptService implements PasswordRepromptServiceAbstracti
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalService: ModalService,
|
private modalService: ModalService,
|
||||||
private keyConnectorService: KeyConnectorService
|
private keyConnectorService: KeyConnectorService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
protectedFields() {
|
protectedFields() {
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
import { Injectable } from "@angular/core";
|
import { Injectable } from "@angular/core";
|
||||||
import { CanActivate, Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
|
|
||||||
import { StateService } from "@/jslib/common/src/abstractions/state.service";
|
import { StateService } from "@/jslib/common/src/abstractions/state.service";
|
||||||
import { VaultTimeoutService } from "@/jslib/common/src/abstractions/vaultTimeout.service";
|
import { VaultTimeoutService } from "@/jslib/common/src/abstractions/vaultTimeout.service";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class UnauthGuardService implements CanActivate {
|
export class UnauthGuardService {
|
||||||
protected homepage = "vault";
|
protected homepage = "vault";
|
||||||
constructor(
|
constructor(
|
||||||
private vaultTimeoutService: VaultTimeoutService,
|
private vaultTimeoutService: VaultTimeoutService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private stateService: StateService
|
private stateService: StateService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async canActivate() {
|
async canActivate() {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { ErrorResponse } from "@/jslib/common/src/models/response/errorResponse"
|
|||||||
export class ValidationService {
|
export class ValidationService {
|
||||||
constructor(
|
constructor(
|
||||||
private i18nService: I18nService,
|
private i18nService: I18nService,
|
||||||
private platformUtilsService: PlatformUtilsService
|
private platformUtilsService: PlatformUtilsService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
showError(data: any): string[] {
|
showError(data: any): string[] {
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ describe("ApiLogInStrategy", () => {
|
|||||||
stateService,
|
stateService,
|
||||||
twoFactorService,
|
twoFactorService,
|
||||||
environmentService,
|
environmentService,
|
||||||
keyConnectorService
|
keyConnectorService,
|
||||||
);
|
);
|
||||||
|
|
||||||
credentials = new ApiLogInCredentials(apiClientId, apiClientSecret);
|
credentials = new ApiLogInCredentials(apiClientId, apiClientSecret);
|
||||||
@@ -86,7 +86,7 @@ describe("ApiLogInStrategy", () => {
|
|||||||
apiTokenRequest.twoFactor.token == null &&
|
apiTokenRequest.twoFactor.token == null &&
|
||||||
apiTokenRequest.captchaResponse == null
|
apiTokenRequest.captchaResponse == null
|
||||||
);
|
);
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ describe("LogInStrategy", () => {
|
|||||||
logService,
|
logService,
|
||||||
stateService,
|
stateService,
|
||||||
twoFactorService,
|
twoFactorService,
|
||||||
authService
|
authService,
|
||||||
);
|
);
|
||||||
credentials = new PasswordLogInCredentials(email, masterPassword);
|
credentials = new PasswordLogInCredentials(email, masterPassword);
|
||||||
});
|
});
|
||||||
@@ -134,7 +134,7 @@ describe("LogInStrategy", () => {
|
|||||||
refreshToken: refreshToken,
|
refreshToken: refreshToken,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
cryptoService.received(1).setEncKey(encKey);
|
cryptoService.received(1).setEncKey(encKey);
|
||||||
cryptoService.received(1).setEncPrivateKey(privateKey);
|
cryptoService.received(1).setEncPrivateKey(privateKey);
|
||||||
@@ -230,7 +230,7 @@ describe("LogInStrategy", () => {
|
|||||||
passwordTokenRequest.twoFactor.token === twoFactorToken &&
|
passwordTokenRequest.twoFactor.token === twoFactorToken &&
|
||||||
passwordTokenRequest.twoFactor.remember === false
|
passwordTokenRequest.twoFactor.remember === false
|
||||||
);
|
);
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -240,7 +240,7 @@ describe("LogInStrategy", () => {
|
|||||||
credentials.twoFactor = new TokenRequestTwoFactor(
|
credentials.twoFactor = new TokenRequestTwoFactor(
|
||||||
twoFactorProviderType,
|
twoFactorProviderType,
|
||||||
twoFactorToken,
|
twoFactorToken,
|
||||||
twoFactorRemember
|
twoFactorRemember,
|
||||||
);
|
);
|
||||||
|
|
||||||
await passwordLogInStrategy.logIn(credentials);
|
await passwordLogInStrategy.logIn(credentials);
|
||||||
@@ -253,7 +253,7 @@ describe("LogInStrategy", () => {
|
|||||||
passwordTokenRequest.twoFactor.token === twoFactorToken &&
|
passwordTokenRequest.twoFactor.token === twoFactorToken &&
|
||||||
passwordTokenRequest.twoFactor.remember === twoFactorRemember
|
passwordTokenRequest.twoFactor.remember === twoFactorRemember
|
||||||
);
|
);
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -263,14 +263,14 @@ describe("LogInStrategy", () => {
|
|||||||
email,
|
email,
|
||||||
masterPasswordHash,
|
masterPasswordHash,
|
||||||
null,
|
null,
|
||||||
null
|
null,
|
||||||
);
|
);
|
||||||
|
|
||||||
apiService.postIdentityToken(Arg.any()).resolves(identityTokenResponseFactory());
|
apiService.postIdentityToken(Arg.any()).resolves(identityTokenResponseFactory());
|
||||||
|
|
||||||
await passwordLogInStrategy.logInTwoFactor(
|
await passwordLogInStrategy.logInTwoFactor(
|
||||||
new TokenRequestTwoFactor(twoFactorProviderType, twoFactorToken, twoFactorRemember),
|
new TokenRequestTwoFactor(twoFactorProviderType, twoFactorToken, twoFactorRemember),
|
||||||
null
|
null,
|
||||||
);
|
);
|
||||||
|
|
||||||
apiService.received(1).postIdentityToken(
|
apiService.received(1).postIdentityToken(
|
||||||
@@ -281,7 +281,7 @@ describe("LogInStrategy", () => {
|
|||||||
passwordTokenRequest.twoFactor.token === twoFactorToken &&
|
passwordTokenRequest.twoFactor.token === twoFactorToken &&
|
||||||
passwordTokenRequest.twoFactor.remember === twoFactorRemember
|
passwordTokenRequest.twoFactor.remember === twoFactorRemember
|
||||||
);
|
);
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ const hashedPassword = "HASHED_PASSWORD";
|
|||||||
const localHashedPassword = "LOCAL_HASHED_PASSWORD";
|
const localHashedPassword = "LOCAL_HASHED_PASSWORD";
|
||||||
const preloginKey = new SymmetricCryptoKey(
|
const preloginKey = new SymmetricCryptoKey(
|
||||||
Utils.fromB64ToArray(
|
Utils.fromB64ToArray(
|
||||||
"N2KWjlLpfi5uHjv+YcfUKIpZ1l+W+6HRensmIqD+BFYBf6N/dvFpJfWwYnVBdgFCK2tJTAIMLhqzIQQEUmGFgg=="
|
"N2KWjlLpfi5uHjv+YcfUKIpZ1l+W+6HRensmIqD+BFYBf6N/dvFpJfWwYnVBdgFCK2tJTAIMLhqzIQQEUmGFgg==",
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
const deviceId = Utils.newGuid();
|
const deviceId = Utils.newGuid();
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ describe("PasswordLogInStrategy", () => {
|
|||||||
logService,
|
logService,
|
||||||
stateService,
|
stateService,
|
||||||
twoFactorService,
|
twoFactorService,
|
||||||
authService
|
authService,
|
||||||
);
|
);
|
||||||
credentials = new PasswordLogInCredentials(email, masterPassword);
|
credentials = new PasswordLogInCredentials(email, masterPassword);
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ describe("PasswordLogInStrategy", () => {
|
|||||||
passwordTokenRequest.twoFactor.token == null &&
|
passwordTokenRequest.twoFactor.token == null &&
|
||||||
passwordTokenRequest.captchaResponse == null
|
passwordTokenRequest.captchaResponse == null
|
||||||
);
|
);
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ describe("SsoLogInStrategy", () => {
|
|||||||
logService,
|
logService,
|
||||||
stateService,
|
stateService,
|
||||||
twoFactorService,
|
twoFactorService,
|
||||||
keyConnectorService
|
keyConnectorService,
|
||||||
);
|
);
|
||||||
credentials = new SsoLogInCredentials(ssoCode, ssoCodeVerifier, ssoRedirectUrl, ssoOrgId);
|
credentials = new SsoLogInCredentials(ssoCode, ssoCodeVerifier, ssoRedirectUrl, ssoOrgId);
|
||||||
});
|
});
|
||||||
@@ -87,7 +87,7 @@ describe("SsoLogInStrategy", () => {
|
|||||||
ssoTokenRequest.twoFactor.provider == null &&
|
ssoTokenRequest.twoFactor.provider == null &&
|
||||||
ssoTokenRequest.twoFactor.token == null
|
ssoTokenRequest.twoFactor.token == null
|
||||||
);
|
);
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ describe("Cipher Service", () => {
|
|||||||
i18nService,
|
i18nService,
|
||||||
() => searchService,
|
() => searchService,
|
||||||
logService,
|
logService,
|
||||||
stateService
|
stateService,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ describe("State Migration Service", () => {
|
|||||||
stateMigrationService = new StateMigrationService(
|
stateMigrationService = new StateMigrationService(
|
||||||
storageService,
|
storageService,
|
||||||
secureStorageService,
|
secureStorageService,
|
||||||
stateFactory
|
stateFactory,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ describe("State Migration Service", () => {
|
|||||||
storageService.received(1).save(
|
storageService.received(1).save(
|
||||||
"global",
|
"global",
|
||||||
Arg.is((globals: GlobalState) => globals.stateVersion === StateVersion.Four),
|
Arg.is((globals: GlobalState) => globals.stateVersion === StateVersion.Four),
|
||||||
Arg.any()
|
Arg.any(),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export function GetUniqueString(prefix = "") {
|
|||||||
|
|
||||||
export function BuildTestObject<T, K extends keyof T = keyof T>(
|
export function BuildTestObject<T, K extends keyof T = keyof T>(
|
||||||
def: Partial<Pick<T, K>> | T,
|
def: Partial<Pick<T, K>> | T,
|
||||||
constructor?: new () => T
|
constructor?: new () => T,
|
||||||
): T {
|
): T {
|
||||||
return Object.assign(constructor === null ? {} : new constructor(), def) as T;
|
return Object.assign(constructor === null ? {} : new constructor(), def) as T;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ import { SendAccessView } from "../models/view/sendAccessView";
|
|||||||
|
|
||||||
export abstract class ApiService {
|
export abstract class ApiService {
|
||||||
postIdentityToken: (
|
postIdentityToken: (
|
||||||
request: PasswordTokenRequest | SsoTokenRequest | ApiTokenRequest
|
request: PasswordTokenRequest | SsoTokenRequest | ApiTokenRequest,
|
||||||
) => Promise<IdentityTokenResponse | IdentityTwoFactorResponse | IdentityCaptchaResponse>;
|
) => Promise<IdentityTokenResponse | IdentityTwoFactorResponse | IdentityCaptchaResponse>;
|
||||||
refreshIdentityToken: () => Promise<any>;
|
refreshIdentityToken: () => Promise<any>;
|
||||||
|
|
||||||
@@ -221,7 +221,7 @@ export abstract class ApiService {
|
|||||||
postSendAccess: (
|
postSendAccess: (
|
||||||
id: string,
|
id: string,
|
||||||
request: SendAccessRequest,
|
request: SendAccessRequest,
|
||||||
apiUrl?: string
|
apiUrl?: string,
|
||||||
) => Promise<SendAccessResponse>;
|
) => Promise<SendAccessResponse>;
|
||||||
getSends: () => Promise<ListResponse<SendResponse>>;
|
getSends: () => Promise<ListResponse<SendResponse>>;
|
||||||
postSend: (request: SendRequest) => Promise<SendResponse>;
|
postSend: (request: SendRequest) => Promise<SendResponse>;
|
||||||
@@ -238,7 +238,7 @@ export abstract class ApiService {
|
|||||||
getSendFileDownloadData: (
|
getSendFileDownloadData: (
|
||||||
send: SendAccessView,
|
send: SendAccessView,
|
||||||
request: SendAccessRequest,
|
request: SendAccessRequest,
|
||||||
apiUrl?: string
|
apiUrl?: string,
|
||||||
) => Promise<SendFileDownloadDataResponse>;
|
) => Promise<SendFileDownloadDataResponse>;
|
||||||
renewSendFileUploadUrl: (sendId: string, fileId: string) => Promise<SendFileUploadDataResponse>;
|
renewSendFileUploadUrl: (sendId: string, fileId: string) => Promise<SendFileUploadDataResponse>;
|
||||||
|
|
||||||
@@ -247,7 +247,7 @@ export abstract class ApiService {
|
|||||||
getAttachmentData: (
|
getAttachmentData: (
|
||||||
cipherId: string,
|
cipherId: string,
|
||||||
attachmentId: string,
|
attachmentId: string,
|
||||||
emergencyAccessId?: string
|
emergencyAccessId?: string,
|
||||||
) => Promise<AttachmentResponse>;
|
) => Promise<AttachmentResponse>;
|
||||||
getCiphersOrganization: (organizationId: string) => Promise<ListResponse<CipherResponse>>;
|
getCiphersOrganization: (organizationId: string) => Promise<ListResponse<CipherResponse>>;
|
||||||
postCipher: (request: CipherRequest) => Promise<CipherResponse>;
|
postCipher: (request: CipherRequest) => Promise<CipherResponse>;
|
||||||
@@ -268,7 +268,7 @@ export abstract class ApiService {
|
|||||||
postImportCiphers: (request: ImportCiphersRequest) => Promise<any>;
|
postImportCiphers: (request: ImportCiphersRequest) => Promise<any>;
|
||||||
postImportOrganizationCiphers: (
|
postImportOrganizationCiphers: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
request: ImportOrganizationCiphersRequest
|
request: ImportOrganizationCiphersRequest,
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
putDeleteCipher: (id: string) => Promise<any>;
|
putDeleteCipher: (id: string) => Promise<any>;
|
||||||
putDeleteCipherAdmin: (id: string) => Promise<any>;
|
putDeleteCipherAdmin: (id: string) => Promise<any>;
|
||||||
@@ -277,7 +277,7 @@ export abstract class ApiService {
|
|||||||
putRestoreCipher: (id: string) => Promise<CipherResponse>;
|
putRestoreCipher: (id: string) => Promise<CipherResponse>;
|
||||||
putRestoreCipherAdmin: (id: string) => Promise<CipherResponse>;
|
putRestoreCipherAdmin: (id: string) => Promise<CipherResponse>;
|
||||||
putRestoreManyCiphers: (
|
putRestoreManyCiphers: (
|
||||||
request: CipherBulkRestoreRequest
|
request: CipherBulkRestoreRequest,
|
||||||
) => Promise<ListResponse<CipherResponse>>;
|
) => Promise<ListResponse<CipherResponse>>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -292,7 +292,7 @@ export abstract class ApiService {
|
|||||||
postCipherAttachmentAdminLegacy: (id: string, data: FormData) => Promise<CipherResponse>;
|
postCipherAttachmentAdminLegacy: (id: string, data: FormData) => Promise<CipherResponse>;
|
||||||
postCipherAttachment: (
|
postCipherAttachment: (
|
||||||
id: string,
|
id: string,
|
||||||
request: AttachmentRequest
|
request: AttachmentRequest,
|
||||||
) => Promise<AttachmentUploadDataResponse>;
|
) => Promise<AttachmentUploadDataResponse>;
|
||||||
deleteCipherAttachment: (id: string, attachmentId: string) => Promise<any>;
|
deleteCipherAttachment: (id: string, attachmentId: string) => Promise<any>;
|
||||||
deleteCipherAttachmentAdmin: (id: string, attachmentId: string) => Promise<any>;
|
deleteCipherAttachmentAdmin: (id: string, attachmentId: string) => Promise<any>;
|
||||||
@@ -300,40 +300,40 @@ export abstract class ApiService {
|
|||||||
id: string,
|
id: string,
|
||||||
attachmentId: string,
|
attachmentId: string,
|
||||||
data: FormData,
|
data: FormData,
|
||||||
organizationId: string
|
organizationId: string,
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
renewAttachmentUploadUrl: (
|
renewAttachmentUploadUrl: (
|
||||||
id: string,
|
id: string,
|
||||||
attachmentId: string
|
attachmentId: string,
|
||||||
) => Promise<AttachmentUploadDataResponse>;
|
) => Promise<AttachmentUploadDataResponse>;
|
||||||
postAttachmentFile: (id: string, attachmentId: string, data: FormData) => Promise<any>;
|
postAttachmentFile: (id: string, attachmentId: string, data: FormData) => Promise<any>;
|
||||||
|
|
||||||
getCollectionDetails: (
|
getCollectionDetails: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
id: string
|
id: string,
|
||||||
) => Promise<CollectionGroupDetailsResponse>;
|
) => Promise<CollectionGroupDetailsResponse>;
|
||||||
getUserCollections: () => Promise<ListResponse<CollectionResponse>>;
|
getUserCollections: () => Promise<ListResponse<CollectionResponse>>;
|
||||||
getCollections: (organizationId: string) => Promise<ListResponse<CollectionResponse>>;
|
getCollections: (organizationId: string) => Promise<ListResponse<CollectionResponse>>;
|
||||||
getCollectionUsers: (organizationId: string, id: string) => Promise<SelectionReadOnlyResponse[]>;
|
getCollectionUsers: (organizationId: string, id: string) => Promise<SelectionReadOnlyResponse[]>;
|
||||||
postCollection: (
|
postCollection: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
request: CollectionRequest
|
request: CollectionRequest,
|
||||||
) => Promise<CollectionResponse>;
|
) => Promise<CollectionResponse>;
|
||||||
putCollectionUsers: (
|
putCollectionUsers: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
id: string,
|
id: string,
|
||||||
request: SelectionReadOnlyRequest[]
|
request: SelectionReadOnlyRequest[],
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
putCollection: (
|
putCollection: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
id: string,
|
id: string,
|
||||||
request: CollectionRequest
|
request: CollectionRequest,
|
||||||
) => Promise<CollectionResponse>;
|
) => Promise<CollectionResponse>;
|
||||||
deleteCollection: (organizationId: string, id: string) => Promise<any>;
|
deleteCollection: (organizationId: string, id: string) => Promise<any>;
|
||||||
deleteCollectionUser: (
|
deleteCollectionUser: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
id: string,
|
id: string,
|
||||||
organizationUserId: string
|
organizationUserId: string,
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
|
|
||||||
getGroupDetails: (organizationId: string, id: string) => Promise<GroupDetailsResponse>;
|
getGroupDetails: (organizationId: string, id: string) => Promise<GroupDetailsResponse>;
|
||||||
@@ -351,82 +351,82 @@ export abstract class ApiService {
|
|||||||
organizationId: string,
|
organizationId: string,
|
||||||
token: string,
|
token: string,
|
||||||
email: string,
|
email: string,
|
||||||
organizationUserId: string
|
organizationUserId: string,
|
||||||
) => Promise<ListResponse<PolicyResponse>>;
|
) => Promise<ListResponse<PolicyResponse>>;
|
||||||
getPoliciesByInvitedUser: (
|
getPoliciesByInvitedUser: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
userId: string
|
userId: string,
|
||||||
) => Promise<ListResponse<PolicyResponse>>;
|
) => Promise<ListResponse<PolicyResponse>>;
|
||||||
putPolicy: (
|
putPolicy: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
type: PolicyType,
|
type: PolicyType,
|
||||||
request: PolicyRequest
|
request: PolicyRequest,
|
||||||
) => Promise<PolicyResponse>;
|
) => Promise<PolicyResponse>;
|
||||||
|
|
||||||
getOrganizationUser: (
|
getOrganizationUser: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
id: string
|
id: string,
|
||||||
) => Promise<OrganizationUserDetailsResponse>;
|
) => Promise<OrganizationUserDetailsResponse>;
|
||||||
getOrganizationUserGroups: (organizationId: string, id: string) => Promise<string[]>;
|
getOrganizationUserGroups: (organizationId: string, id: string) => Promise<string[]>;
|
||||||
getOrganizationUsers: (
|
getOrganizationUsers: (
|
||||||
organizationId: string
|
organizationId: string,
|
||||||
) => Promise<ListResponse<OrganizationUserUserDetailsResponse>>;
|
) => Promise<ListResponse<OrganizationUserUserDetailsResponse>>;
|
||||||
getOrganizationUserResetPasswordDetails: (
|
getOrganizationUserResetPasswordDetails: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
id: string
|
id: string,
|
||||||
) => Promise<OrganizationUserResetPasswordDetailsReponse>;
|
) => Promise<OrganizationUserResetPasswordDetailsReponse>;
|
||||||
postOrganizationUserInvite: (
|
postOrganizationUserInvite: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
request: OrganizationUserInviteRequest
|
request: OrganizationUserInviteRequest,
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
postOrganizationUserReinvite: (organizationId: string, id: string) => Promise<any>;
|
postOrganizationUserReinvite: (organizationId: string, id: string) => Promise<any>;
|
||||||
postManyOrganizationUserReinvite: (
|
postManyOrganizationUserReinvite: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
request: OrganizationUserBulkRequest
|
request: OrganizationUserBulkRequest,
|
||||||
) => Promise<ListResponse<OrganizationUserBulkResponse>>;
|
) => Promise<ListResponse<OrganizationUserBulkResponse>>;
|
||||||
postOrganizationUserAccept: (
|
postOrganizationUserAccept: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
id: string,
|
id: string,
|
||||||
request: OrganizationUserAcceptRequest
|
request: OrganizationUserAcceptRequest,
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
postOrganizationUserConfirm: (
|
postOrganizationUserConfirm: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
id: string,
|
id: string,
|
||||||
request: OrganizationUserConfirmRequest
|
request: OrganizationUserConfirmRequest,
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
postOrganizationUsersPublicKey: (
|
postOrganizationUsersPublicKey: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
request: OrganizationUserBulkRequest
|
request: OrganizationUserBulkRequest,
|
||||||
) => Promise<ListResponse<OrganizationUserBulkPublicKeyResponse>>;
|
) => Promise<ListResponse<OrganizationUserBulkPublicKeyResponse>>;
|
||||||
postOrganizationUserBulkConfirm: (
|
postOrganizationUserBulkConfirm: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
request: OrganizationUserBulkConfirmRequest
|
request: OrganizationUserBulkConfirmRequest,
|
||||||
) => Promise<ListResponse<OrganizationUserBulkResponse>>;
|
) => Promise<ListResponse<OrganizationUserBulkResponse>>;
|
||||||
|
|
||||||
putOrganizationUser: (
|
putOrganizationUser: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
id: string,
|
id: string,
|
||||||
request: OrganizationUserUpdateRequest
|
request: OrganizationUserUpdateRequest,
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
putOrganizationUserGroups: (
|
putOrganizationUserGroups: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
id: string,
|
id: string,
|
||||||
request: OrganizationUserUpdateGroupsRequest
|
request: OrganizationUserUpdateGroupsRequest,
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
putOrganizationUserResetPasswordEnrollment: (
|
putOrganizationUserResetPasswordEnrollment: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
userId: string,
|
userId: string,
|
||||||
request: OrganizationUserResetPasswordEnrollmentRequest
|
request: OrganizationUserResetPasswordEnrollmentRequest,
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
putOrganizationUserResetPassword: (
|
putOrganizationUserResetPassword: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
id: string,
|
id: string,
|
||||||
request: OrganizationUserResetPasswordRequest
|
request: OrganizationUserResetPasswordRequest,
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
deleteOrganizationUser: (organizationId: string, id: string) => Promise<any>;
|
deleteOrganizationUser: (organizationId: string, id: string) => Promise<any>;
|
||||||
deleteManyOrganizationUsers: (
|
deleteManyOrganizationUsers: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
request: OrganizationUserBulkRequest
|
request: OrganizationUserBulkRequest,
|
||||||
) => Promise<ListResponse<OrganizationUserBulkResponse>>;
|
) => Promise<ListResponse<OrganizationUserBulkResponse>>;
|
||||||
|
|
||||||
getSync: () => Promise<SyncResponse>;
|
getSync: () => Promise<SyncResponse>;
|
||||||
@@ -438,43 +438,43 @@ export abstract class ApiService {
|
|||||||
|
|
||||||
getTwoFactorProviders: () => Promise<ListResponse<TwoFactorProviderResponse>>;
|
getTwoFactorProviders: () => Promise<ListResponse<TwoFactorProviderResponse>>;
|
||||||
getTwoFactorOrganizationProviders: (
|
getTwoFactorOrganizationProviders: (
|
||||||
organizationId: string
|
organizationId: string,
|
||||||
) => Promise<ListResponse<TwoFactorProviderResponse>>;
|
) => Promise<ListResponse<TwoFactorProviderResponse>>;
|
||||||
getTwoFactorAuthenticator: (
|
getTwoFactorAuthenticator: (
|
||||||
request: SecretVerificationRequest
|
request: SecretVerificationRequest,
|
||||||
) => Promise<TwoFactorAuthenticatorResponse>;
|
) => Promise<TwoFactorAuthenticatorResponse>;
|
||||||
getTwoFactorEmail: (request: SecretVerificationRequest) => Promise<TwoFactorEmailResponse>;
|
getTwoFactorEmail: (request: SecretVerificationRequest) => Promise<TwoFactorEmailResponse>;
|
||||||
getTwoFactorDuo: (request: SecretVerificationRequest) => Promise<TwoFactorDuoResponse>;
|
getTwoFactorDuo: (request: SecretVerificationRequest) => Promise<TwoFactorDuoResponse>;
|
||||||
getTwoFactorOrganizationDuo: (
|
getTwoFactorOrganizationDuo: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
request: SecretVerificationRequest
|
request: SecretVerificationRequest,
|
||||||
) => Promise<TwoFactorDuoResponse>;
|
) => Promise<TwoFactorDuoResponse>;
|
||||||
getTwoFactorYubiKey: (request: SecretVerificationRequest) => Promise<TwoFactorYubiKeyResponse>;
|
getTwoFactorYubiKey: (request: SecretVerificationRequest) => Promise<TwoFactorYubiKeyResponse>;
|
||||||
getTwoFactorWebAuthn: (request: SecretVerificationRequest) => Promise<TwoFactorWebAuthnResponse>;
|
getTwoFactorWebAuthn: (request: SecretVerificationRequest) => Promise<TwoFactorWebAuthnResponse>;
|
||||||
getTwoFactorWebAuthnChallenge: (request: SecretVerificationRequest) => Promise<ChallengeResponse>;
|
getTwoFactorWebAuthnChallenge: (request: SecretVerificationRequest) => Promise<ChallengeResponse>;
|
||||||
getTwoFactorRecover: (request: SecretVerificationRequest) => Promise<TwoFactorRecoverResponse>;
|
getTwoFactorRecover: (request: SecretVerificationRequest) => Promise<TwoFactorRecoverResponse>;
|
||||||
putTwoFactorAuthenticator: (
|
putTwoFactorAuthenticator: (
|
||||||
request: UpdateTwoFactorAuthenticatorRequest
|
request: UpdateTwoFactorAuthenticatorRequest,
|
||||||
) => Promise<TwoFactorAuthenticatorResponse>;
|
) => Promise<TwoFactorAuthenticatorResponse>;
|
||||||
putTwoFactorEmail: (request: UpdateTwoFactorEmailRequest) => Promise<TwoFactorEmailResponse>;
|
putTwoFactorEmail: (request: UpdateTwoFactorEmailRequest) => Promise<TwoFactorEmailResponse>;
|
||||||
putTwoFactorDuo: (request: UpdateTwoFactorDuoRequest) => Promise<TwoFactorDuoResponse>;
|
putTwoFactorDuo: (request: UpdateTwoFactorDuoRequest) => Promise<TwoFactorDuoResponse>;
|
||||||
putTwoFactorOrganizationDuo: (
|
putTwoFactorOrganizationDuo: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
request: UpdateTwoFactorDuoRequest
|
request: UpdateTwoFactorDuoRequest,
|
||||||
) => Promise<TwoFactorDuoResponse>;
|
) => Promise<TwoFactorDuoResponse>;
|
||||||
putTwoFactorYubiKey: (
|
putTwoFactorYubiKey: (
|
||||||
request: UpdateTwoFactorYubioOtpRequest
|
request: UpdateTwoFactorYubioOtpRequest,
|
||||||
) => Promise<TwoFactorYubiKeyResponse>;
|
) => Promise<TwoFactorYubiKeyResponse>;
|
||||||
putTwoFactorWebAuthn: (
|
putTwoFactorWebAuthn: (
|
||||||
request: UpdateTwoFactorWebAuthnRequest
|
request: UpdateTwoFactorWebAuthnRequest,
|
||||||
) => Promise<TwoFactorWebAuthnResponse>;
|
) => Promise<TwoFactorWebAuthnResponse>;
|
||||||
deleteTwoFactorWebAuthn: (
|
deleteTwoFactorWebAuthn: (
|
||||||
request: UpdateTwoFactorWebAuthnDeleteRequest
|
request: UpdateTwoFactorWebAuthnDeleteRequest,
|
||||||
) => Promise<TwoFactorWebAuthnResponse>;
|
) => Promise<TwoFactorWebAuthnResponse>;
|
||||||
putTwoFactorDisable: (request: TwoFactorProviderRequest) => Promise<TwoFactorProviderResponse>;
|
putTwoFactorDisable: (request: TwoFactorProviderRequest) => Promise<TwoFactorProviderResponse>;
|
||||||
putTwoFactorOrganizationDisable: (
|
putTwoFactorOrganizationDisable: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
request: TwoFactorProviderRequest
|
request: TwoFactorProviderRequest,
|
||||||
) => Promise<TwoFactorProviderResponse>;
|
) => Promise<TwoFactorProviderResponse>;
|
||||||
postTwoFactorRecover: (request: TwoFactorRecoveryRequest) => Promise<any>;
|
postTwoFactorRecover: (request: TwoFactorRecoveryRequest) => Promise<any>;
|
||||||
postTwoFactorEmailSetup: (request: TwoFactorEmailRequest) => Promise<any>;
|
postTwoFactorEmailSetup: (request: TwoFactorEmailRequest) => Promise<any>;
|
||||||
@@ -496,7 +496,7 @@ export abstract class ApiService {
|
|||||||
postEmergencyAccessTakeover: (id: string) => Promise<EmergencyAccessTakeoverResponse>;
|
postEmergencyAccessTakeover: (id: string) => Promise<EmergencyAccessTakeoverResponse>;
|
||||||
postEmergencyAccessPassword: (
|
postEmergencyAccessPassword: (
|
||||||
id: string,
|
id: string,
|
||||||
request: EmergencyAccessPasswordRequest
|
request: EmergencyAccessPasswordRequest,
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
postEmergencyAccessView: (id: string) => Promise<EmergencyAccessViewResponse>;
|
postEmergencyAccessView: (id: string) => Promise<EmergencyAccessViewResponse>;
|
||||||
|
|
||||||
@@ -506,13 +506,13 @@ export abstract class ApiService {
|
|||||||
getOrganizationLicense: (id: string, installationId: string) => Promise<any>;
|
getOrganizationLicense: (id: string, installationId: string) => Promise<any>;
|
||||||
getOrganizationTaxInfo: (id: string) => Promise<TaxInfoResponse>;
|
getOrganizationTaxInfo: (id: string) => Promise<TaxInfoResponse>;
|
||||||
getOrganizationAutoEnrollStatus: (
|
getOrganizationAutoEnrollStatus: (
|
||||||
identifier: string
|
identifier: string,
|
||||||
) => Promise<OrganizationAutoEnrollStatusResponse>;
|
) => Promise<OrganizationAutoEnrollStatusResponse>;
|
||||||
getOrganizationSso: (id: string) => Promise<OrganizationSsoResponse>;
|
getOrganizationSso: (id: string) => Promise<OrganizationSsoResponse>;
|
||||||
postOrganization: (request: OrganizationCreateRequest) => Promise<OrganizationResponse>;
|
postOrganization: (request: OrganizationCreateRequest) => Promise<OrganizationResponse>;
|
||||||
putOrganization: (
|
putOrganization: (
|
||||||
id: string,
|
id: string,
|
||||||
request: OrganizationUpdateRequest
|
request: OrganizationUpdateRequest,
|
||||||
) => Promise<OrganizationResponse>;
|
) => Promise<OrganizationResponse>;
|
||||||
putOrganizationTaxInfo: (id: string, request: OrganizationTaxInfoUpdateRequest) => Promise<any>;
|
putOrganizationTaxInfo: (id: string, request: OrganizationTaxInfoUpdateRequest) => Promise<any>;
|
||||||
postLeaveOrganization: (id: string) => Promise<any>;
|
postLeaveOrganization: (id: string) => Promise<any>;
|
||||||
@@ -520,23 +520,23 @@ export abstract class ApiService {
|
|||||||
postOrganizationLicenseUpdate: (id: string, data: FormData) => Promise<any>;
|
postOrganizationLicenseUpdate: (id: string, data: FormData) => Promise<any>;
|
||||||
postOrganizationApiKey: (
|
postOrganizationApiKey: (
|
||||||
id: string,
|
id: string,
|
||||||
request: SecretVerificationRequest
|
request: SecretVerificationRequest,
|
||||||
) => Promise<ApiKeyResponse>;
|
) => Promise<ApiKeyResponse>;
|
||||||
postOrganizationRotateApiKey: (
|
postOrganizationRotateApiKey: (
|
||||||
id: string,
|
id: string,
|
||||||
request: SecretVerificationRequest
|
request: SecretVerificationRequest,
|
||||||
) => Promise<ApiKeyResponse>;
|
) => Promise<ApiKeyResponse>;
|
||||||
postOrganizationSso: (
|
postOrganizationSso: (
|
||||||
id: string,
|
id: string,
|
||||||
request: OrganizationSsoRequest
|
request: OrganizationSsoRequest,
|
||||||
) => Promise<OrganizationSsoResponse>;
|
) => Promise<OrganizationSsoResponse>;
|
||||||
postOrganizationUpgrade: (
|
postOrganizationUpgrade: (
|
||||||
id: string,
|
id: string,
|
||||||
request: OrganizationUpgradeRequest
|
request: OrganizationUpgradeRequest,
|
||||||
) => Promise<PaymentResponse>;
|
) => Promise<PaymentResponse>;
|
||||||
postOrganizationUpdateSubscription: (
|
postOrganizationUpdateSubscription: (
|
||||||
id: string,
|
id: string,
|
||||||
request: OrganizationSubscriptionUpdateRequest
|
request: OrganizationSubscriptionUpdateRequest,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
postOrganizationSeat: (id: string, request: SeatRequest) => Promise<PaymentResponse>;
|
postOrganizationSeat: (id: string, request: SeatRequest) => Promise<PaymentResponse>;
|
||||||
postOrganizationStorage: (id: string, request: StorageRequest) => Promise<any>;
|
postOrganizationStorage: (id: string, request: StorageRequest) => Promise<any>;
|
||||||
@@ -550,7 +550,7 @@ export abstract class ApiService {
|
|||||||
getOrganizationKeys: (id: string) => Promise<OrganizationKeysResponse>;
|
getOrganizationKeys: (id: string) => Promise<OrganizationKeysResponse>;
|
||||||
postOrganizationKeys: (
|
postOrganizationKeys: (
|
||||||
id: string,
|
id: string,
|
||||||
request: OrganizationKeysRequest
|
request: OrganizationKeysRequest,
|
||||||
) => Promise<OrganizationKeysResponse>;
|
) => Promise<OrganizationKeysResponse>;
|
||||||
|
|
||||||
postProviderSetup: (id: string, request: ProviderSetupRequest) => Promise<ProviderResponse>;
|
postProviderSetup: (id: string, request: ProviderSetupRequest) => Promise<ProviderResponse>;
|
||||||
@@ -563,46 +563,46 @@ export abstract class ApiService {
|
|||||||
postProviderUserReinvite: (providerId: string, id: string) => Promise<any>;
|
postProviderUserReinvite: (providerId: string, id: string) => Promise<any>;
|
||||||
postManyProviderUserReinvite: (
|
postManyProviderUserReinvite: (
|
||||||
providerId: string,
|
providerId: string,
|
||||||
request: ProviderUserBulkRequest
|
request: ProviderUserBulkRequest,
|
||||||
) => Promise<ListResponse<ProviderUserBulkResponse>>;
|
) => Promise<ListResponse<ProviderUserBulkResponse>>;
|
||||||
postProviderUserAccept: (
|
postProviderUserAccept: (
|
||||||
providerId: string,
|
providerId: string,
|
||||||
id: string,
|
id: string,
|
||||||
request: ProviderUserAcceptRequest
|
request: ProviderUserAcceptRequest,
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
postProviderUserConfirm: (
|
postProviderUserConfirm: (
|
||||||
providerId: string,
|
providerId: string,
|
||||||
id: string,
|
id: string,
|
||||||
request: ProviderUserConfirmRequest
|
request: ProviderUserConfirmRequest,
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
postProviderUsersPublicKey: (
|
postProviderUsersPublicKey: (
|
||||||
providerId: string,
|
providerId: string,
|
||||||
request: ProviderUserBulkRequest
|
request: ProviderUserBulkRequest,
|
||||||
) => Promise<ListResponse<ProviderUserBulkPublicKeyResponse>>;
|
) => Promise<ListResponse<ProviderUserBulkPublicKeyResponse>>;
|
||||||
postProviderUserBulkConfirm: (
|
postProviderUserBulkConfirm: (
|
||||||
providerId: string,
|
providerId: string,
|
||||||
request: ProviderUserBulkConfirmRequest
|
request: ProviderUserBulkConfirmRequest,
|
||||||
) => Promise<ListResponse<ProviderUserBulkResponse>>;
|
) => Promise<ListResponse<ProviderUserBulkResponse>>;
|
||||||
putProviderUser: (
|
putProviderUser: (
|
||||||
providerId: string,
|
providerId: string,
|
||||||
id: string,
|
id: string,
|
||||||
request: ProviderUserUpdateRequest
|
request: ProviderUserUpdateRequest,
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
deleteProviderUser: (organizationId: string, id: string) => Promise<any>;
|
deleteProviderUser: (organizationId: string, id: string) => Promise<any>;
|
||||||
deleteManyProviderUsers: (
|
deleteManyProviderUsers: (
|
||||||
providerId: string,
|
providerId: string,
|
||||||
request: ProviderUserBulkRequest
|
request: ProviderUserBulkRequest,
|
||||||
) => Promise<ListResponse<ProviderUserBulkResponse>>;
|
) => Promise<ListResponse<ProviderUserBulkResponse>>;
|
||||||
getProviderClients: (
|
getProviderClients: (
|
||||||
providerId: string
|
providerId: string,
|
||||||
) => Promise<ListResponse<ProviderOrganizationOrganizationDetailsResponse>>;
|
) => Promise<ListResponse<ProviderOrganizationOrganizationDetailsResponse>>;
|
||||||
postProviderAddOrganization: (
|
postProviderAddOrganization: (
|
||||||
providerId: string,
|
providerId: string,
|
||||||
request: ProviderAddOrganizationRequest
|
request: ProviderAddOrganizationRequest,
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
postProviderCreateOrganization: (
|
postProviderCreateOrganization: (
|
||||||
providerId: string,
|
providerId: string,
|
||||||
request: ProviderOrganizationCreateRequest
|
request: ProviderOrganizationCreateRequest,
|
||||||
) => Promise<ProviderOrganizationResponse>;
|
) => Promise<ProviderOrganizationResponse>;
|
||||||
deleteProviderOrganization: (providerId: string, organizationId: string) => Promise<any>;
|
deleteProviderOrganization: (providerId: string, organizationId: string) => Promise<any>;
|
||||||
|
|
||||||
@@ -611,33 +611,33 @@ export abstract class ApiService {
|
|||||||
id: string,
|
id: string,
|
||||||
start: string,
|
start: string,
|
||||||
end: string,
|
end: string,
|
||||||
token: string
|
token: string,
|
||||||
) => Promise<ListResponse<EventResponse>>;
|
) => Promise<ListResponse<EventResponse>>;
|
||||||
getEventsOrganization: (
|
getEventsOrganization: (
|
||||||
id: string,
|
id: string,
|
||||||
start: string,
|
start: string,
|
||||||
end: string,
|
end: string,
|
||||||
token: string
|
token: string,
|
||||||
) => Promise<ListResponse<EventResponse>>;
|
) => Promise<ListResponse<EventResponse>>;
|
||||||
getEventsOrganizationUser: (
|
getEventsOrganizationUser: (
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
id: string,
|
id: string,
|
||||||
start: string,
|
start: string,
|
||||||
end: string,
|
end: string,
|
||||||
token: string
|
token: string,
|
||||||
) => Promise<ListResponse<EventResponse>>;
|
) => Promise<ListResponse<EventResponse>>;
|
||||||
getEventsProvider: (
|
getEventsProvider: (
|
||||||
id: string,
|
id: string,
|
||||||
start: string,
|
start: string,
|
||||||
end: string,
|
end: string,
|
||||||
token: string
|
token: string,
|
||||||
) => Promise<ListResponse<EventResponse>>;
|
) => Promise<ListResponse<EventResponse>>;
|
||||||
getEventsProviderUser: (
|
getEventsProviderUser: (
|
||||||
providerId: string,
|
providerId: string,
|
||||||
id: string,
|
id: string,
|
||||||
start: string,
|
start: string,
|
||||||
end: string,
|
end: string,
|
||||||
token: string
|
token: string,
|
||||||
) => Promise<ListResponse<EventResponse>>;
|
) => Promise<ListResponse<EventResponse>>;
|
||||||
postEventsCollect: (request: EventRequest[]) => Promise<any>;
|
postEventsCollect: (request: EventRequest[]) => Promise<any>;
|
||||||
|
|
||||||
@@ -659,21 +659,21 @@ export abstract class ApiService {
|
|||||||
|
|
||||||
postCreateSponsorship: (
|
postCreateSponsorship: (
|
||||||
sponsorshipOrgId: string,
|
sponsorshipOrgId: string,
|
||||||
request: OrganizationSponsorshipCreateRequest
|
request: OrganizationSponsorshipCreateRequest,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
deleteRevokeSponsorship: (sponsoringOrganizationId: string) => Promise<void>;
|
deleteRevokeSponsorship: (sponsoringOrganizationId: string) => Promise<void>;
|
||||||
deleteRemoveSponsorship: (sponsoringOrgId: string) => Promise<void>;
|
deleteRemoveSponsorship: (sponsoringOrgId: string) => Promise<void>;
|
||||||
postPreValidateSponsorshipToken: (sponsorshipToken: string) => Promise<boolean>;
|
postPreValidateSponsorshipToken: (sponsorshipToken: string) => Promise<boolean>;
|
||||||
postRedeemSponsorship: (
|
postRedeemSponsorship: (
|
||||||
sponsorshipToken: string,
|
sponsorshipToken: string,
|
||||||
request: OrganizationSponsorshipRedeemRequest
|
request: OrganizationSponsorshipRedeemRequest,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
postResendSponsorshipOffer: (sponsoringOrgId: string) => Promise<void>;
|
postResendSponsorshipOffer: (sponsoringOrgId: string) => Promise<void>;
|
||||||
|
|
||||||
getUserKeyFromKeyConnector: (keyConnectorUrl: string) => Promise<KeyConnectorUserKeyResponse>;
|
getUserKeyFromKeyConnector: (keyConnectorUrl: string) => Promise<KeyConnectorUserKeyResponse>;
|
||||||
postUserKeyToKeyConnector: (
|
postUserKeyToKeyConnector: (
|
||||||
keyConnectorUrl: string,
|
keyConnectorUrl: string,
|
||||||
request: KeyConnectorUserKeyRequest
|
request: KeyConnectorUserKeyRequest,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
getKeyConnectorAlive: (keyConnectorUrl: string) => Promise<void>;
|
getKeyConnectorAlive: (keyConnectorUrl: string) => Promise<void>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ export abstract class AuthService {
|
|||||||
masterPasswordHash: string;
|
masterPasswordHash: string;
|
||||||
email: string;
|
email: string;
|
||||||
logIn: (
|
logIn: (
|
||||||
credentials: ApiLogInCredentials | PasswordLogInCredentials | SsoLogInCredentials
|
credentials: ApiLogInCredentials | PasswordLogInCredentials | SsoLogInCredentials,
|
||||||
) => Promise<AuthResult>;
|
) => Promise<AuthResult>;
|
||||||
logInTwoFactor: (
|
logInTwoFactor: (
|
||||||
twoFactor: TokenRequestTwoFactor,
|
twoFactor: TokenRequestTwoFactor,
|
||||||
captchaResponse: string
|
captchaResponse: string,
|
||||||
) => Promise<AuthResult>;
|
) => Promise<AuthResult>;
|
||||||
logOut: (callback: () => void) => void;
|
logOut: (callback: () => void) => void;
|
||||||
makePreloginKey: (masterPassword: string, email: string) => Promise<SymmetricCryptoKey>;
|
makePreloginKey: (masterPassword: string, email: string) => Promise<SymmetricCryptoKey>;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export abstract class CipherService {
|
|||||||
encrypt: (
|
encrypt: (
|
||||||
model: CipherView,
|
model: CipherView,
|
||||||
key?: SymmetricCryptoKey,
|
key?: SymmetricCryptoKey,
|
||||||
originalCipher?: Cipher
|
originalCipher?: Cipher,
|
||||||
) => Promise<Cipher>;
|
) => Promise<Cipher>;
|
||||||
encryptFields: (fieldsModel: FieldView[], key: SymmetricCryptoKey) => Promise<Field[]>;
|
encryptFields: (fieldsModel: FieldView[], key: SymmetricCryptoKey) => Promise<Field[]>;
|
||||||
encryptField: (fieldModel: FieldView, key: SymmetricCryptoKey) => Promise<Field>;
|
encryptField: (fieldModel: FieldView, key: SymmetricCryptoKey) => Promise<Field>;
|
||||||
@@ -23,7 +23,7 @@ export abstract class CipherService {
|
|||||||
getAllDecryptedForUrl: (
|
getAllDecryptedForUrl: (
|
||||||
url: string,
|
url: string,
|
||||||
includeOtherTypes?: CipherType[],
|
includeOtherTypes?: CipherType[],
|
||||||
defaultMatch?: UriMatchType
|
defaultMatch?: UriMatchType,
|
||||||
) => Promise<CipherView[]>;
|
) => Promise<CipherView[]>;
|
||||||
getAllFromApiForOrganization: (organizationId: string) => Promise<CipherView[]>;
|
getAllFromApiForOrganization: (organizationId: string) => Promise<CipherView[]>;
|
||||||
getLastUsedForUrl: (url: string, autofillOnPageLoad: boolean) => Promise<CipherView>;
|
getLastUsedForUrl: (url: string, autofillOnPageLoad: boolean) => Promise<CipherView>;
|
||||||
@@ -37,23 +37,23 @@ export abstract class CipherService {
|
|||||||
shareWithServer: (
|
shareWithServer: (
|
||||||
cipher: CipherView,
|
cipher: CipherView,
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
collectionIds: string[]
|
collectionIds: string[],
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
shareManyWithServer: (
|
shareManyWithServer: (
|
||||||
ciphers: CipherView[],
|
ciphers: CipherView[],
|
||||||
organizationId: string,
|
organizationId: string,
|
||||||
collectionIds: string[]
|
collectionIds: string[],
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
saveAttachmentWithServer: (
|
saveAttachmentWithServer: (
|
||||||
cipher: Cipher,
|
cipher: Cipher,
|
||||||
unencryptedFile: any,
|
unencryptedFile: any,
|
||||||
admin?: boolean
|
admin?: boolean,
|
||||||
) => Promise<Cipher>;
|
) => Promise<Cipher>;
|
||||||
saveAttachmentRawWithServer: (
|
saveAttachmentRawWithServer: (
|
||||||
cipher: Cipher,
|
cipher: Cipher,
|
||||||
filename: string,
|
filename: string,
|
||||||
data: ArrayBuffer,
|
data: ArrayBuffer,
|
||||||
admin?: boolean
|
admin?: boolean,
|
||||||
) => Promise<Cipher>;
|
) => Promise<Cipher>;
|
||||||
saveCollectionsWithServer: (cipher: Cipher) => Promise<any>;
|
saveCollectionsWithServer: (cipher: Cipher) => Promise<any>;
|
||||||
upsert: (cipher: CipherData | CipherData[]) => Promise<any>;
|
upsert: (cipher: CipherData | CipherData[]) => Promise<any>;
|
||||||
@@ -72,7 +72,7 @@ export abstract class CipherService {
|
|||||||
softDeleteWithServer: (id: string) => Promise<any>;
|
softDeleteWithServer: (id: string) => Promise<any>;
|
||||||
softDeleteManyWithServer: (ids: string[]) => Promise<any>;
|
softDeleteManyWithServer: (ids: string[]) => Promise<any>;
|
||||||
restore: (
|
restore: (
|
||||||
cipher: { id: string; revisionDate: string } | { id: string; revisionDate: string }[]
|
cipher: { id: string; revisionDate: string } | { id: string; revisionDate: string }[],
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
restoreWithServer: (id: string) => Promise<any>;
|
restoreWithServer: (id: string) => Promise<any>;
|
||||||
restoreManyWithServer: (ids: string[]) => Promise<any>;
|
restoreManyWithServer: (ids: string[]) => Promise<any>;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export abstract class CryptoService {
|
|||||||
setEncPrivateKey: (encPrivateKey: string) => Promise<void>;
|
setEncPrivateKey: (encPrivateKey: string) => Promise<void>;
|
||||||
setOrgKeys: (
|
setOrgKeys: (
|
||||||
orgs: ProfileOrganizationResponse[],
|
orgs: ProfileOrganizationResponse[],
|
||||||
providerOrgs: ProfileProviderOrganizationResponse[]
|
providerOrgs: ProfileProviderOrganizationResponse[],
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
setProviderKeys: (orgs: ProfileProviderResponse[]) => Promise<void>;
|
setProviderKeys: (orgs: ProfileProviderResponse[]) => Promise<void>;
|
||||||
getKey: (keySuffix?: KeySuffixOptions, userId?: string) => Promise<SymmetricCryptoKey>;
|
getKey: (keySuffix?: KeySuffixOptions, userId?: string) => Promise<SymmetricCryptoKey>;
|
||||||
@@ -46,14 +46,14 @@ export abstract class CryptoService {
|
|||||||
password: string,
|
password: string,
|
||||||
salt: string,
|
salt: string,
|
||||||
kdf: KdfType,
|
kdf: KdfType,
|
||||||
kdfIterations: number
|
kdfIterations: number,
|
||||||
) => Promise<SymmetricCryptoKey>;
|
) => Promise<SymmetricCryptoKey>;
|
||||||
makeKeyFromPin: (
|
makeKeyFromPin: (
|
||||||
pin: string,
|
pin: string,
|
||||||
salt: string,
|
salt: string,
|
||||||
kdf: KdfType,
|
kdf: KdfType,
|
||||||
kdfIterations: number,
|
kdfIterations: number,
|
||||||
protectedKeyCs?: EncString
|
protectedKeyCs?: EncString,
|
||||||
) => Promise<SymmetricCryptoKey>;
|
) => Promise<SymmetricCryptoKey>;
|
||||||
makeShareKey: () => Promise<[EncString, SymmetricCryptoKey]>;
|
makeShareKey: () => Promise<[EncString, SymmetricCryptoKey]>;
|
||||||
makeKeyPair: (key?: SymmetricCryptoKey) => Promise<[string, EncString]>;
|
makeKeyPair: (key?: SymmetricCryptoKey) => Promise<[string, EncString]>;
|
||||||
@@ -61,18 +61,18 @@ export abstract class CryptoService {
|
|||||||
pin: string,
|
pin: string,
|
||||||
salt: string,
|
salt: string,
|
||||||
kdf: KdfType,
|
kdf: KdfType,
|
||||||
kdfIterations: number
|
kdfIterations: number,
|
||||||
) => Promise<SymmetricCryptoKey>;
|
) => Promise<SymmetricCryptoKey>;
|
||||||
makeSendKey: (keyMaterial: ArrayBuffer) => Promise<SymmetricCryptoKey>;
|
makeSendKey: (keyMaterial: ArrayBuffer) => Promise<SymmetricCryptoKey>;
|
||||||
hashPassword: (
|
hashPassword: (
|
||||||
password: string,
|
password: string,
|
||||||
key: SymmetricCryptoKey,
|
key: SymmetricCryptoKey,
|
||||||
hashPurpose?: HashPurpose
|
hashPurpose?: HashPurpose,
|
||||||
) => Promise<string>;
|
) => Promise<string>;
|
||||||
makeEncKey: (key: SymmetricCryptoKey) => Promise<[SymmetricCryptoKey, EncString]>;
|
makeEncKey: (key: SymmetricCryptoKey) => Promise<[SymmetricCryptoKey, EncString]>;
|
||||||
remakeEncKey: (
|
remakeEncKey: (
|
||||||
key: SymmetricCryptoKey,
|
key: SymmetricCryptoKey,
|
||||||
encKey?: SymmetricCryptoKey
|
encKey?: SymmetricCryptoKey,
|
||||||
) => Promise<[SymmetricCryptoKey, EncString]>;
|
) => Promise<[SymmetricCryptoKey, EncString]>;
|
||||||
encrypt: (plainValue: string | ArrayBuffer, key?: SymmetricCryptoKey) => Promise<EncString>;
|
encrypt: (plainValue: string | ArrayBuffer, key?: SymmetricCryptoKey) => Promise<EncString>;
|
||||||
encryptToBytes: (plainValue: ArrayBuffer, key?: SymmetricCryptoKey) => Promise<EncArrayBuffer>;
|
encryptToBytes: (plainValue: ArrayBuffer, key?: SymmetricCryptoKey) => Promise<EncArrayBuffer>;
|
||||||
|
|||||||
@@ -6,35 +6,35 @@ export abstract class CryptoFunctionService {
|
|||||||
password: string | ArrayBuffer,
|
password: string | ArrayBuffer,
|
||||||
salt: string | ArrayBuffer,
|
salt: string | ArrayBuffer,
|
||||||
algorithm: "sha256" | "sha512",
|
algorithm: "sha256" | "sha512",
|
||||||
iterations: number
|
iterations: number,
|
||||||
) => Promise<ArrayBuffer>;
|
) => Promise<ArrayBuffer>;
|
||||||
hkdf: (
|
hkdf: (
|
||||||
ikm: ArrayBuffer,
|
ikm: ArrayBuffer,
|
||||||
salt: string | ArrayBuffer,
|
salt: string | ArrayBuffer,
|
||||||
info: string | ArrayBuffer,
|
info: string | ArrayBuffer,
|
||||||
outputByteSize: number,
|
outputByteSize: number,
|
||||||
algorithm: "sha256" | "sha512"
|
algorithm: "sha256" | "sha512",
|
||||||
) => Promise<ArrayBuffer>;
|
) => Promise<ArrayBuffer>;
|
||||||
hkdfExpand: (
|
hkdfExpand: (
|
||||||
prk: ArrayBuffer,
|
prk: ArrayBuffer,
|
||||||
info: string | ArrayBuffer,
|
info: string | ArrayBuffer,
|
||||||
outputByteSize: number,
|
outputByteSize: number,
|
||||||
algorithm: "sha256" | "sha512"
|
algorithm: "sha256" | "sha512",
|
||||||
) => Promise<ArrayBuffer>;
|
) => Promise<ArrayBuffer>;
|
||||||
hash: (
|
hash: (
|
||||||
value: string | ArrayBuffer,
|
value: string | ArrayBuffer,
|
||||||
algorithm: "sha1" | "sha256" | "sha512" | "md5"
|
algorithm: "sha1" | "sha256" | "sha512" | "md5",
|
||||||
) => Promise<ArrayBuffer>;
|
) => Promise<ArrayBuffer>;
|
||||||
hmac: (
|
hmac: (
|
||||||
value: ArrayBuffer,
|
value: ArrayBuffer,
|
||||||
key: ArrayBuffer,
|
key: ArrayBuffer,
|
||||||
algorithm: "sha1" | "sha256" | "sha512"
|
algorithm: "sha1" | "sha256" | "sha512",
|
||||||
) => Promise<ArrayBuffer>;
|
) => Promise<ArrayBuffer>;
|
||||||
compare: (a: ArrayBuffer, b: ArrayBuffer) => Promise<boolean>;
|
compare: (a: ArrayBuffer, b: ArrayBuffer) => Promise<boolean>;
|
||||||
hmacFast: (
|
hmacFast: (
|
||||||
value: ArrayBuffer | string,
|
value: ArrayBuffer | string,
|
||||||
key: ArrayBuffer | string,
|
key: ArrayBuffer | string,
|
||||||
algorithm: "sha1" | "sha256" | "sha512"
|
algorithm: "sha1" | "sha256" | "sha512",
|
||||||
) => Promise<ArrayBuffer | string>;
|
) => Promise<ArrayBuffer | string>;
|
||||||
compareFast: (a: ArrayBuffer | string, b: ArrayBuffer | string) => Promise<boolean>;
|
compareFast: (a: ArrayBuffer | string, b: ArrayBuffer | string) => Promise<boolean>;
|
||||||
aesEncrypt: (data: ArrayBuffer, iv: ArrayBuffer, key: ArrayBuffer) => Promise<ArrayBuffer>;
|
aesEncrypt: (data: ArrayBuffer, iv: ArrayBuffer, key: ArrayBuffer) => Promise<ArrayBuffer>;
|
||||||
@@ -42,19 +42,19 @@ export abstract class CryptoFunctionService {
|
|||||||
data: string,
|
data: string,
|
||||||
iv: string,
|
iv: string,
|
||||||
mac: string,
|
mac: string,
|
||||||
key: SymmetricCryptoKey
|
key: SymmetricCryptoKey,
|
||||||
) => DecryptParameters<ArrayBuffer | string>;
|
) => DecryptParameters<ArrayBuffer | string>;
|
||||||
aesDecryptFast: (parameters: DecryptParameters<ArrayBuffer | string>) => Promise<string>;
|
aesDecryptFast: (parameters: DecryptParameters<ArrayBuffer | string>) => Promise<string>;
|
||||||
aesDecrypt: (data: ArrayBuffer, iv: ArrayBuffer, key: ArrayBuffer) => Promise<ArrayBuffer>;
|
aesDecrypt: (data: ArrayBuffer, iv: ArrayBuffer, key: ArrayBuffer) => Promise<ArrayBuffer>;
|
||||||
rsaEncrypt: (
|
rsaEncrypt: (
|
||||||
data: ArrayBuffer,
|
data: ArrayBuffer,
|
||||||
publicKey: ArrayBuffer,
|
publicKey: ArrayBuffer,
|
||||||
algorithm: "sha1" | "sha256"
|
algorithm: "sha1" | "sha256",
|
||||||
) => Promise<ArrayBuffer>;
|
) => Promise<ArrayBuffer>;
|
||||||
rsaDecrypt: (
|
rsaDecrypt: (
|
||||||
data: ArrayBuffer,
|
data: ArrayBuffer,
|
||||||
privateKey: ArrayBuffer,
|
privateKey: ArrayBuffer,
|
||||||
algorithm: "sha1" | "sha256"
|
algorithm: "sha1" | "sha256",
|
||||||
) => Promise<ArrayBuffer>;
|
) => Promise<ArrayBuffer>;
|
||||||
rsaExtractPublicKey: (privateKey: ArrayBuffer) => Promise<ArrayBuffer>;
|
rsaExtractPublicKey: (privateKey: ArrayBuffer) => Promise<ArrayBuffer>;
|
||||||
rsaGenerateKeyPair: (length: 1024 | 2048 | 4096) => Promise<[ArrayBuffer, ArrayBuffer]>;
|
rsaGenerateKeyPair: (length: 1024 | 2048 | 4096) => Promise<[ArrayBuffer, ArrayBuffer]>;
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ export abstract class FileUploadService {
|
|||||||
uploadSendFile: (
|
uploadSendFile: (
|
||||||
uploadData: SendFileUploadDataResponse,
|
uploadData: SendFileUploadDataResponse,
|
||||||
fileName: EncString,
|
fileName: EncString,
|
||||||
encryptedFileData: EncArrayBuffer
|
encryptedFileData: EncArrayBuffer,
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
uploadCipherAttachment: (
|
uploadCipherAttachment: (
|
||||||
admin: boolean,
|
admin: boolean,
|
||||||
uploadData: AttachmentUploadDataResponse,
|
uploadData: AttachmentUploadDataResponse,
|
||||||
fileName: EncString,
|
fileName: EncString,
|
||||||
encryptedFileData: EncArrayBuffer
|
encryptedFileData: EncArrayBuffer,
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export abstract class KeyConnectorService {
|
|||||||
userNeedsMigration: () => Promise<boolean>;
|
userNeedsMigration: () => Promise<boolean>;
|
||||||
convertNewSsoUserToKeyConnector: (
|
convertNewSsoUserToKeyConnector: (
|
||||||
tokenResponse: IdentityTokenResponse,
|
tokenResponse: IdentityTokenResponse,
|
||||||
orgId: string
|
orgId: string,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
setUsesKeyConnector: (enabled: boolean) => Promise<void>;
|
setUsesKeyConnector: (enabled: boolean) => Promise<void>;
|
||||||
setConvertAccountRequired: (status: boolean) => Promise<void>;
|
setConvertAccountRequired: (status: boolean) => Promise<void>;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export abstract class PasswordGenerationService {
|
|||||||
generatePassphrase: (options: any) => Promise<string>;
|
generatePassphrase: (options: any) => Promise<string>;
|
||||||
getOptions: () => Promise<[any, PasswordGeneratorPolicyOptions]>;
|
getOptions: () => Promise<[any, PasswordGeneratorPolicyOptions]>;
|
||||||
enforcePasswordGeneratorPoliciesOnOptions: (
|
enforcePasswordGeneratorPoliciesOnOptions: (
|
||||||
options: any
|
options: any,
|
||||||
) => Promise<[any, PasswordGeneratorPolicyOptions]>;
|
) => Promise<[any, PasswordGeneratorPolicyOptions]>;
|
||||||
getPasswordGeneratorPolicyOptions: () => Promise<PasswordGeneratorPolicyOptions>;
|
getPasswordGeneratorPolicyOptions: () => Promise<PasswordGeneratorPolicyOptions>;
|
||||||
saveOptions: (options: any) => Promise<any>;
|
saveOptions: (options: any) => Promise<any>;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export abstract class PlatformUtilsService {
|
|||||||
type: "error" | "success" | "warning" | "info",
|
type: "error" | "success" | "warning" | "info",
|
||||||
title: string,
|
title: string,
|
||||||
text: string | string[],
|
text: string | string[],
|
||||||
options?: ToastOptions
|
options?: ToastOptions,
|
||||||
) => void;
|
) => void;
|
||||||
showDialog: (
|
showDialog: (
|
||||||
body: string,
|
body: string,
|
||||||
@@ -35,7 +35,7 @@ export abstract class PlatformUtilsService {
|
|||||||
confirmText?: string,
|
confirmText?: string,
|
||||||
cancelText?: string,
|
cancelText?: string,
|
||||||
type?: string,
|
type?: string,
|
||||||
bodyIsHtml?: boolean
|
bodyIsHtml?: boolean,
|
||||||
) => Promise<boolean>;
|
) => Promise<boolean>;
|
||||||
isDev: () => boolean;
|
isDev: () => boolean;
|
||||||
isSelfHost: () => boolean;
|
isSelfHost: () => boolean;
|
||||||
@@ -45,7 +45,7 @@ export abstract class PlatformUtilsService {
|
|||||||
authenticateBiometric: () => Promise<boolean>;
|
authenticateBiometric: () => Promise<boolean>;
|
||||||
getDefaultSystemTheme: () => Promise<ThemeType.Light | ThemeType.Dark>;
|
getDefaultSystemTheme: () => Promise<ThemeType.Light | ThemeType.Dark>;
|
||||||
onDefaultSystemThemeChange: (
|
onDefaultSystemThemeChange: (
|
||||||
callback: (theme: ThemeType.Light | ThemeType.Dark) => unknown
|
callback: (theme: ThemeType.Light | ThemeType.Dark) => unknown,
|
||||||
) => unknown;
|
) => unknown;
|
||||||
getEffectiveTheme: () => Promise<ThemeType>;
|
getEffectiveTheme: () => Promise<ThemeType>;
|
||||||
supportsSecureStorage: () => boolean;
|
supportsSecureStorage: () => boolean;
|
||||||
|
|||||||
@@ -17,16 +17,16 @@ export abstract class PolicyService {
|
|||||||
evaluateMasterPassword: (
|
evaluateMasterPassword: (
|
||||||
passwordStrength: number,
|
passwordStrength: number,
|
||||||
newPassword: string,
|
newPassword: string,
|
||||||
enforcedPolicyOptions?: MasterPasswordPolicyOptions
|
enforcedPolicyOptions?: MasterPasswordPolicyOptions,
|
||||||
) => boolean;
|
) => boolean;
|
||||||
getResetPasswordPolicyOptions: (
|
getResetPasswordPolicyOptions: (
|
||||||
policies: Policy[],
|
policies: Policy[],
|
||||||
orgId: string
|
orgId: string,
|
||||||
) => [ResetPasswordPolicyOptions, boolean];
|
) => [ResetPasswordPolicyOptions, boolean];
|
||||||
mapPoliciesFromToken: (policiesResponse: ListResponse<PolicyResponse>) => Policy[];
|
mapPoliciesFromToken: (policiesResponse: ListResponse<PolicyResponse>) => Policy[];
|
||||||
policyAppliesToUser: (
|
policyAppliesToUser: (
|
||||||
policyType: PolicyType,
|
policyType: PolicyType,
|
||||||
policyFilter?: (policy: Policy) => boolean,
|
policyFilter?: (policy: Policy) => boolean,
|
||||||
userId?: string
|
userId?: string,
|
||||||
) => Promise<boolean>;
|
) => Promise<boolean>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export abstract class SearchService {
|
|||||||
searchCiphers: (
|
searchCiphers: (
|
||||||
query: string,
|
query: string,
|
||||||
filter?: ((cipher: CipherView) => boolean) | ((cipher: CipherView) => boolean)[],
|
filter?: ((cipher: CipherView) => boolean) | ((cipher: CipherView) => boolean)[],
|
||||||
ciphers?: CipherView[]
|
ciphers?: CipherView[],
|
||||||
) => Promise<CipherView[]>;
|
) => Promise<CipherView[]>;
|
||||||
searchCiphersBasic: (ciphers: CipherView[], query: string, deleted?: boolean) => CipherView[];
|
searchCiphersBasic: (ciphers: CipherView[], query: string, deleted?: boolean) => CipherView[];
|
||||||
searchSends: (sends: SendView[], query: string) => SendView[];
|
searchSends: (sends: SendView[], query: string) => SendView[];
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export abstract class SendService {
|
|||||||
model: SendView,
|
model: SendView,
|
||||||
file: File | ArrayBuffer,
|
file: File | ArrayBuffer,
|
||||||
password: string,
|
password: string,
|
||||||
key?: SymmetricCryptoKey
|
key?: SymmetricCryptoKey,
|
||||||
) => Promise<[Send, EncArrayBuffer]>;
|
) => Promise<[Send, EncArrayBuffer]>;
|
||||||
get: (id: string) => Promise<Send>;
|
get: (id: string) => Promise<Send>;
|
||||||
getAll: () => Promise<Send[]>;
|
getAll: () => Promise<Send[]>;
|
||||||
|
|||||||
@@ -82,23 +82,23 @@ export abstract class StateService<T extends Account = Account> {
|
|||||||
getDecryptedCryptoSymmetricKey: (options?: StorageOptions) => Promise<SymmetricCryptoKey>;
|
getDecryptedCryptoSymmetricKey: (options?: StorageOptions) => Promise<SymmetricCryptoKey>;
|
||||||
setDecryptedCryptoSymmetricKey: (
|
setDecryptedCryptoSymmetricKey: (
|
||||||
value: SymmetricCryptoKey,
|
value: SymmetricCryptoKey,
|
||||||
options?: StorageOptions
|
options?: StorageOptions,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
getDecryptedFolders: (options?: StorageOptions) => Promise<FolderView[]>;
|
getDecryptedFolders: (options?: StorageOptions) => Promise<FolderView[]>;
|
||||||
setDecryptedFolders: (value: FolderView[], options?: StorageOptions) => Promise<void>;
|
setDecryptedFolders: (value: FolderView[], options?: StorageOptions) => Promise<void>;
|
||||||
getDecryptedOrganizationKeys: (
|
getDecryptedOrganizationKeys: (
|
||||||
options?: StorageOptions
|
options?: StorageOptions,
|
||||||
) => Promise<Map<string, SymmetricCryptoKey>>;
|
) => Promise<Map<string, SymmetricCryptoKey>>;
|
||||||
setDecryptedOrganizationKeys: (
|
setDecryptedOrganizationKeys: (
|
||||||
value: Map<string, SymmetricCryptoKey>,
|
value: Map<string, SymmetricCryptoKey>,
|
||||||
options?: StorageOptions
|
options?: StorageOptions,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
getDecryptedPasswordGenerationHistory: (
|
getDecryptedPasswordGenerationHistory: (
|
||||||
options?: StorageOptions
|
options?: StorageOptions,
|
||||||
) => Promise<GeneratedPasswordHistory[]>;
|
) => Promise<GeneratedPasswordHistory[]>;
|
||||||
setDecryptedPasswordGenerationHistory: (
|
setDecryptedPasswordGenerationHistory: (
|
||||||
value: GeneratedPasswordHistory[],
|
value: GeneratedPasswordHistory[],
|
||||||
options?: StorageOptions
|
options?: StorageOptions,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
getDecryptedPinProtected: (options?: StorageOptions) => Promise<EncString>;
|
getDecryptedPinProtected: (options?: StorageOptions) => Promise<EncString>;
|
||||||
setDecryptedPinProtected: (value: EncString, options?: StorageOptions) => Promise<void>;
|
setDecryptedPinProtected: (value: EncString, options?: StorageOptions) => Promise<void>;
|
||||||
@@ -109,7 +109,7 @@ export abstract class StateService<T extends Account = Account> {
|
|||||||
getDecryptedProviderKeys: (options?: StorageOptions) => Promise<Map<string, SymmetricCryptoKey>>;
|
getDecryptedProviderKeys: (options?: StorageOptions) => Promise<Map<string, SymmetricCryptoKey>>;
|
||||||
setDecryptedProviderKeys: (
|
setDecryptedProviderKeys: (
|
||||||
value: Map<string, SymmetricCryptoKey>,
|
value: Map<string, SymmetricCryptoKey>,
|
||||||
options?: StorageOptions
|
options?: StorageOptions,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
getDecryptedSends: (options?: StorageOptions) => Promise<SendView[]>;
|
getDecryptedSends: (options?: StorageOptions) => Promise<SendView[]>;
|
||||||
setDecryptedSends: (value: SendView[], options?: StorageOptions) => Promise<void>;
|
setDecryptedSends: (value: SendView[], options?: StorageOptions) => Promise<void>;
|
||||||
@@ -126,7 +126,7 @@ export abstract class StateService<T extends Account = Account> {
|
|||||||
getDisableChangedPasswordNotification: (options?: StorageOptions) => Promise<boolean>;
|
getDisableChangedPasswordNotification: (options?: StorageOptions) => Promise<boolean>;
|
||||||
setDisableChangedPasswordNotification: (
|
setDisableChangedPasswordNotification: (
|
||||||
value: boolean,
|
value: boolean,
|
||||||
options?: StorageOptions
|
options?: StorageOptions,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
getDisableContextMenuItem: (options?: StorageOptions) => Promise<boolean>;
|
getDisableContextMenuItem: (options?: StorageOptions) => Promise<boolean>;
|
||||||
setDisableContextMenuItem: (value: boolean, options?: StorageOptions) => Promise<void>;
|
setDisableContextMenuItem: (value: boolean, options?: StorageOptions) => Promise<void>;
|
||||||
@@ -153,7 +153,7 @@ export abstract class StateService<T extends Account = Account> {
|
|||||||
getEnableBrowserIntegrationFingerprint: (options?: StorageOptions) => Promise<boolean>;
|
getEnableBrowserIntegrationFingerprint: (options?: StorageOptions) => Promise<boolean>;
|
||||||
setEnableBrowserIntegrationFingerprint: (
|
setEnableBrowserIntegrationFingerprint: (
|
||||||
value: boolean,
|
value: boolean,
|
||||||
options?: StorageOptions
|
options?: StorageOptions,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
getEnableCloseToTray: (options?: StorageOptions) => Promise<boolean>;
|
getEnableCloseToTray: (options?: StorageOptions) => Promise<boolean>;
|
||||||
setEnableCloseToTray: (value: boolean, options?: StorageOptions) => Promise<void>;
|
setEnableCloseToTray: (value: boolean, options?: StorageOptions) => Promise<void>;
|
||||||
@@ -170,38 +170,38 @@ export abstract class StateService<T extends Account = Account> {
|
|||||||
getEncryptedCiphers: (options?: StorageOptions) => Promise<{ [id: string]: CipherData }>;
|
getEncryptedCiphers: (options?: StorageOptions) => Promise<{ [id: string]: CipherData }>;
|
||||||
setEncryptedCiphers: (
|
setEncryptedCiphers: (
|
||||||
value: { [id: string]: CipherData },
|
value: { [id: string]: CipherData },
|
||||||
options?: StorageOptions
|
options?: StorageOptions,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
getEncryptedCollections: (options?: StorageOptions) => Promise<{ [id: string]: CollectionData }>;
|
getEncryptedCollections: (options?: StorageOptions) => Promise<{ [id: string]: CollectionData }>;
|
||||||
setEncryptedCollections: (
|
setEncryptedCollections: (
|
||||||
value: { [id: string]: CollectionData },
|
value: { [id: string]: CollectionData },
|
||||||
options?: StorageOptions
|
options?: StorageOptions,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
getEncryptedCryptoSymmetricKey: (options?: StorageOptions) => Promise<string>;
|
getEncryptedCryptoSymmetricKey: (options?: StorageOptions) => Promise<string>;
|
||||||
setEncryptedCryptoSymmetricKey: (value: string, options?: StorageOptions) => Promise<void>;
|
setEncryptedCryptoSymmetricKey: (value: string, options?: StorageOptions) => Promise<void>;
|
||||||
getEncryptedFolders: (options?: StorageOptions) => Promise<{ [id: string]: FolderData }>;
|
getEncryptedFolders: (options?: StorageOptions) => Promise<{ [id: string]: FolderData }>;
|
||||||
setEncryptedFolders: (
|
setEncryptedFolders: (
|
||||||
value: { [id: string]: FolderData },
|
value: { [id: string]: FolderData },
|
||||||
options?: StorageOptions
|
options?: StorageOptions,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
getEncryptedOrganizationKeys: (options?: StorageOptions) => Promise<any>;
|
getEncryptedOrganizationKeys: (options?: StorageOptions) => Promise<any>;
|
||||||
setEncryptedOrganizationKeys: (
|
setEncryptedOrganizationKeys: (
|
||||||
value: Map<string, SymmetricCryptoKey>,
|
value: Map<string, SymmetricCryptoKey>,
|
||||||
options?: StorageOptions
|
options?: StorageOptions,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
getEncryptedPasswordGenerationHistory: (
|
getEncryptedPasswordGenerationHistory: (
|
||||||
options?: StorageOptions
|
options?: StorageOptions,
|
||||||
) => Promise<GeneratedPasswordHistory[]>;
|
) => Promise<GeneratedPasswordHistory[]>;
|
||||||
setEncryptedPasswordGenerationHistory: (
|
setEncryptedPasswordGenerationHistory: (
|
||||||
value: GeneratedPasswordHistory[],
|
value: GeneratedPasswordHistory[],
|
||||||
options?: StorageOptions
|
options?: StorageOptions,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
getEncryptedPinProtected: (options?: StorageOptions) => Promise<string>;
|
getEncryptedPinProtected: (options?: StorageOptions) => Promise<string>;
|
||||||
setEncryptedPinProtected: (value: string, options?: StorageOptions) => Promise<void>;
|
setEncryptedPinProtected: (value: string, options?: StorageOptions) => Promise<void>;
|
||||||
getEncryptedPolicies: (options?: StorageOptions) => Promise<{ [id: string]: PolicyData }>;
|
getEncryptedPolicies: (options?: StorageOptions) => Promise<{ [id: string]: PolicyData }>;
|
||||||
setEncryptedPolicies: (
|
setEncryptedPolicies: (
|
||||||
value: { [id: string]: PolicyData },
|
value: { [id: string]: PolicyData },
|
||||||
options?: StorageOptions
|
options?: StorageOptions,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
getEncryptedPrivateKey: (options?: StorageOptions) => Promise<string>;
|
getEncryptedPrivateKey: (options?: StorageOptions) => Promise<string>;
|
||||||
setEncryptedPrivateKey: (value: string, options?: StorageOptions) => Promise<void>;
|
setEncryptedPrivateKey: (value: string, options?: StorageOptions) => Promise<void>;
|
||||||
@@ -210,9 +210,6 @@ export abstract class StateService<T extends Account = Account> {
|
|||||||
getEncryptedSends: (options?: StorageOptions) => Promise<{ [id: string]: SendData }>;
|
getEncryptedSends: (options?: StorageOptions) => Promise<{ [id: string]: SendData }>;
|
||||||
setEncryptedSends: (value: { [id: string]: SendData }, options?: StorageOptions) => Promise<void>;
|
setEncryptedSends: (value: { [id: string]: SendData }, options?: StorageOptions) => Promise<void>;
|
||||||
getEntityId: (options?: StorageOptions) => Promise<string>;
|
getEntityId: (options?: StorageOptions) => Promise<string>;
|
||||||
setEntityId: (value: string, options?: StorageOptions) => Promise<void>;
|
|
||||||
getEntityType: (options?: StorageOptions) => Promise<any>;
|
|
||||||
setEntityType: (value: string, options?: StorageOptions) => Promise<void>;
|
|
||||||
getEnvironmentUrls: (options?: StorageOptions) => Promise<EnvironmentUrls>;
|
getEnvironmentUrls: (options?: StorageOptions) => Promise<EnvironmentUrls>;
|
||||||
setEnvironmentUrls: (value: EnvironmentUrls, options?: StorageOptions) => Promise<void>;
|
setEnvironmentUrls: (value: EnvironmentUrls, options?: StorageOptions) => Promise<void>;
|
||||||
getEquivalentDomains: (options?: StorageOptions) => Promise<any>;
|
getEquivalentDomains: (options?: StorageOptions) => Promise<any>;
|
||||||
@@ -261,7 +258,7 @@ export abstract class StateService<T extends Account = Account> {
|
|||||||
getOrganizations: (options?: StorageOptions) => Promise<{ [id: string]: OrganizationData }>;
|
getOrganizations: (options?: StorageOptions) => Promise<{ [id: string]: OrganizationData }>;
|
||||||
setOrganizations: (
|
setOrganizations: (
|
||||||
value: { [id: string]: OrganizationData },
|
value: { [id: string]: OrganizationData },
|
||||||
options?: StorageOptions
|
options?: StorageOptions,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
getPasswordGenerationOptions: (options?: StorageOptions) => Promise<any>;
|
getPasswordGenerationOptions: (options?: StorageOptions) => Promise<any>;
|
||||||
setPasswordGenerationOptions: (value: any, options?: StorageOptions) => Promise<void>;
|
setPasswordGenerationOptions: (value: any, options?: StorageOptions) => Promise<void>;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ export abstract class TokenService {
|
|||||||
setTokens: (
|
setTokens: (
|
||||||
accessToken: string,
|
accessToken: string,
|
||||||
refreshToken: string,
|
refreshToken: string,
|
||||||
clientIdClientSecret: [string, string]
|
clientIdClientSecret: [string, string],
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
setToken: (token: string) => Promise<any>;
|
setToken: (token: string) => Promise<any>;
|
||||||
getToken: () => Promise<string>;
|
getToken: () => Promise<string>;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export abstract class UserVerificationService {
|
|||||||
buildRequest: <T extends SecretVerificationRequest>(
|
buildRequest: <T extends SecretVerificationRequest>(
|
||||||
verification: Verification,
|
verification: Verification,
|
||||||
requestClass?: new () => T,
|
requestClass?: new () => T,
|
||||||
alreadyHashed?: boolean
|
alreadyHashed?: boolean,
|
||||||
) => Promise<T>;
|
) => Promise<T>;
|
||||||
verifyUser: (verification: Verification) => Promise<boolean>;
|
verifyUser: (verification: Verification) => Promise<boolean>;
|
||||||
requestOTP: () => Promise<void>;
|
requestOTP: () => Promise<void>;
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ import { GlobalStateFactory } from "./globalStateFactory";
|
|||||||
|
|
||||||
export class StateFactory<
|
export class StateFactory<
|
||||||
TGlobal extends GlobalState = GlobalState,
|
TGlobal extends GlobalState = GlobalState,
|
||||||
TAccount extends Account = Account
|
TAccount extends Account = Account,
|
||||||
> {
|
> {
|
||||||
private globalStateFactory: GlobalStateFactory<TGlobal>;
|
private globalStateFactory: GlobalStateFactory<TGlobal>;
|
||||||
private accountFactory: AccountFactory<TAccount>;
|
private accountFactory: AccountFactory<TAccount>;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
globalStateConstructor: new (init: Partial<TGlobal>) => TGlobal,
|
globalStateConstructor: new (init: Partial<TGlobal>) => TGlobal,
|
||||||
accountConstructor: new (init: Partial<TAccount>) => TAccount
|
accountConstructor: new (init: Partial<TAccount>) => TAccount,
|
||||||
) {
|
) {
|
||||||
this.globalStateFactory = new GlobalStateFactory(globalStateConstructor);
|
this.globalStateFactory = new GlobalStateFactory(globalStateConstructor);
|
||||||
this.accountFactory = new AccountFactory(accountConstructor);
|
this.accountFactory = new AccountFactory(accountConstructor);
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export class CaptchaIFrame extends IFrameComponent {
|
|||||||
private i18nService: I18nService,
|
private i18nService: I18nService,
|
||||||
successCallback: (message: string) => any,
|
successCallback: (message: string) => any,
|
||||||
errorCallback: (message: string) => any,
|
errorCallback: (message: string) => any,
|
||||||
infoCallback: (message: string) => any
|
infoCallback: (message: string) => any,
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
win,
|
win,
|
||||||
@@ -26,13 +26,13 @@ export class CaptchaIFrame extends IFrameComponent {
|
|||||||
} else {
|
} else {
|
||||||
infoCallback(parsedMessage);
|
infoCallback(parsedMessage);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
init(siteKey: string): void {
|
init(siteKey: string): void {
|
||||||
super.initComponent(
|
super.initComponent(
|
||||||
this.createParams({ siteKey: siteKey, locale: this.i18nService.translationLocale }, 1)
|
this.createParams({ siteKey: siteKey, locale: this.i18nService.translationLocale }, 1),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export abstract class IFrameComponent {
|
|||||||
private iframeId: string,
|
private iframeId: string,
|
||||||
public successCallback?: (message: string) => any,
|
public successCallback?: (message: string) => any,
|
||||||
public errorCallback?: (message: string) => any,
|
public errorCallback?: (message: string) => any,
|
||||||
public infoCallback?: (message: string) => any
|
public infoCallback?: (message: string) => any,
|
||||||
) {
|
) {
|
||||||
this.connectorLink = win.document.createElement("a");
|
this.connectorLink = win.document.createElement("a");
|
||||||
}
|
}
|
||||||
@@ -35,7 +35,7 @@ export abstract class IFrameComponent {
|
|||||||
return btoa(
|
return btoa(
|
||||||
encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (match, p1) => {
|
encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (match, p1) => {
|
||||||
return String.fromCharCode(("0x" + p1) as any);
|
return String.fromCharCode(("0x" + p1) as any);
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,10 @@ import { LinkedIdType } from "../enums/linkedIdType";
|
|||||||
import { ItemView } from "../models/view/itemView";
|
import { ItemView } from "../models/view/itemView";
|
||||||
|
|
||||||
export class LinkedMetadata {
|
export class LinkedMetadata {
|
||||||
constructor(readonly propertyKey: string, private readonly _i18nKey?: string) {}
|
constructor(
|
||||||
|
readonly propertyKey: string,
|
||||||
|
private readonly _i18nKey?: string,
|
||||||
|
) {}
|
||||||
|
|
||||||
get i18nKey() {
|
get i18nKey() {
|
||||||
return this._i18nKey ?? this.propertyKey;
|
return this._i18nKey ?? this.propertyKey;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export class ApiLogInStrategy extends LogInStrategy {
|
|||||||
stateService: StateService,
|
stateService: StateService,
|
||||||
twoFactorService: TwoFactorService,
|
twoFactorService: TwoFactorService,
|
||||||
private environmentService: EnvironmentService,
|
private environmentService: EnvironmentService,
|
||||||
private keyConnectorService: KeyConnectorService
|
private keyConnectorService: KeyConnectorService,
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cryptoService,
|
cryptoService,
|
||||||
@@ -40,7 +40,7 @@ export class ApiLogInStrategy extends LogInStrategy {
|
|||||||
messagingService,
|
messagingService,
|
||||||
logService,
|
logService,
|
||||||
stateService,
|
stateService,
|
||||||
twoFactorService
|
twoFactorService,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ export class ApiLogInStrategy extends LogInStrategy {
|
|||||||
credentials.clientId,
|
credentials.clientId,
|
||||||
credentials.clientSecret,
|
credentials.clientSecret,
|
||||||
await this.buildTwoFactor(),
|
await this.buildTwoFactor(),
|
||||||
await this.buildDeviceRequest()
|
await this.buildDeviceRequest(),
|
||||||
);
|
);
|
||||||
|
|
||||||
return this.startLogIn();
|
return this.startLogIn();
|
||||||
|
|||||||
@@ -38,16 +38,16 @@ export abstract class LogInStrategy {
|
|||||||
protected messagingService: MessagingService,
|
protected messagingService: MessagingService,
|
||||||
protected logService: LogService,
|
protected logService: LogService,
|
||||||
protected stateService: StateService,
|
protected stateService: StateService,
|
||||||
protected twoFactorService: TwoFactorService
|
protected twoFactorService: TwoFactorService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
abstract logIn(
|
abstract logIn(
|
||||||
credentials: ApiLogInCredentials | PasswordLogInCredentials | SsoLogInCredentials
|
credentials: ApiLogInCredentials | PasswordLogInCredentials | SsoLogInCredentials,
|
||||||
): Promise<AuthResult>;
|
): Promise<AuthResult>;
|
||||||
|
|
||||||
async logInTwoFactor(
|
async logInTwoFactor(
|
||||||
twoFactor: TokenRequestTwoFactor,
|
twoFactor: TokenRequestTwoFactor,
|
||||||
captchaResponse: string = null
|
captchaResponse: string = null,
|
||||||
): Promise<AuthResult> {
|
): Promise<AuthResult> {
|
||||||
this.tokenRequest.setTwoFactor(twoFactor);
|
this.tokenRequest.setTwoFactor(twoFactor);
|
||||||
return this.startLogIn();
|
return this.startLogIn();
|
||||||
@@ -113,7 +113,7 @@ export abstract class LogInStrategy {
|
|||||||
refreshToken: tokenResponse.refreshToken,
|
refreshToken: tokenResponse.refreshToken,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ export abstract class LogInStrategy {
|
|||||||
if (!newSsoUser) {
|
if (!newSsoUser) {
|
||||||
await this.cryptoService.setEncKey(response.key);
|
await this.cryptoService.setEncKey(response.key);
|
||||||
await this.cryptoService.setEncPrivateKey(
|
await this.cryptoService.setEncPrivateKey(
|
||||||
response.privateKey ?? (await this.createKeyPairForOldAccount())
|
response.privateKey ?? (await this.createKeyPairForOldAccount()),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export class PasswordLogInStrategy extends LogInStrategy {
|
|||||||
logService: LogService,
|
logService: LogService,
|
||||||
stateService: StateService,
|
stateService: StateService,
|
||||||
twoFactorService: TwoFactorService,
|
twoFactorService: TwoFactorService,
|
||||||
private authService: AuthService
|
private authService: AuthService,
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cryptoService,
|
cryptoService,
|
||||||
@@ -52,7 +52,7 @@ export class PasswordLogInStrategy extends LogInStrategy {
|
|||||||
messagingService,
|
messagingService,
|
||||||
logService,
|
logService,
|
||||||
stateService,
|
stateService,
|
||||||
twoFactorService
|
twoFactorService,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ export class PasswordLogInStrategy extends LogInStrategy {
|
|||||||
|
|
||||||
async logInTwoFactor(
|
async logInTwoFactor(
|
||||||
twoFactor: TokenRequestTwoFactor,
|
twoFactor: TokenRequestTwoFactor,
|
||||||
captchaResponse: string
|
captchaResponse: string,
|
||||||
): Promise<AuthResult> {
|
): Promise<AuthResult> {
|
||||||
this.tokenRequest.captchaResponse = captchaResponse ?? this.captchaBypassToken;
|
this.tokenRequest.captchaResponse = captchaResponse ?? this.captchaBypassToken;
|
||||||
return super.logInTwoFactor(twoFactor);
|
return super.logInTwoFactor(twoFactor);
|
||||||
@@ -78,7 +78,7 @@ export class PasswordLogInStrategy extends LogInStrategy {
|
|||||||
this.localHashedPassword = await this.cryptoService.hashPassword(
|
this.localHashedPassword = await this.cryptoService.hashPassword(
|
||||||
masterPassword,
|
masterPassword,
|
||||||
this.key,
|
this.key,
|
||||||
HashPurpose.LocalAuthorization
|
HashPurpose.LocalAuthorization,
|
||||||
);
|
);
|
||||||
const hashedPassword = await this.cryptoService.hashPassword(masterPassword, this.key);
|
const hashedPassword = await this.cryptoService.hashPassword(masterPassword, this.key);
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ export class PasswordLogInStrategy extends LogInStrategy {
|
|||||||
hashedPassword,
|
hashedPassword,
|
||||||
captchaToken,
|
captchaToken,
|
||||||
await this.buildTwoFactor(twoFactor),
|
await this.buildTwoFactor(twoFactor),
|
||||||
await this.buildDeviceRequest()
|
await this.buildDeviceRequest(),
|
||||||
);
|
);
|
||||||
|
|
||||||
return this.startLogIn();
|
return this.startLogIn();
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export class SsoLogInStrategy extends LogInStrategy {
|
|||||||
logService: LogService,
|
logService: LogService,
|
||||||
stateService: StateService,
|
stateService: StateService,
|
||||||
twoFactorService: TwoFactorService,
|
twoFactorService: TwoFactorService,
|
||||||
private keyConnectorService: KeyConnectorService
|
private keyConnectorService: KeyConnectorService,
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cryptoService,
|
cryptoService,
|
||||||
@@ -39,7 +39,7 @@ export class SsoLogInStrategy extends LogInStrategy {
|
|||||||
messagingService,
|
messagingService,
|
||||||
logService,
|
logService,
|
||||||
stateService,
|
stateService,
|
||||||
twoFactorService
|
twoFactorService,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ export class SsoLogInStrategy extends LogInStrategy {
|
|||||||
credentials.codeVerifier,
|
credentials.codeVerifier,
|
||||||
credentials.redirectUrl,
|
credentials.redirectUrl,
|
||||||
await this.buildTwoFactor(credentials.twoFactor),
|
await this.buildTwoFactor(credentials.twoFactor),
|
||||||
await this.buildDeviceRequest()
|
await this.buildDeviceRequest(),
|
||||||
);
|
);
|
||||||
|
|
||||||
return this.startLogIn();
|
return this.startLogIn();
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export class ServiceUtils {
|
|||||||
parts: string[],
|
parts: string[],
|
||||||
obj: ITreeNodeObject,
|
obj: ITreeNodeObject,
|
||||||
parent: ITreeNodeObject,
|
parent: ITreeNodeObject,
|
||||||
delimiter: string
|
delimiter: string,
|
||||||
) {
|
) {
|
||||||
if (parts.length <= partIndex) {
|
if (parts.length <= partIndex) {
|
||||||
return;
|
return;
|
||||||
@@ -31,7 +31,7 @@ export class ServiceUtils {
|
|||||||
parts,
|
parts,
|
||||||
obj,
|
obj,
|
||||||
nodeTree[i].node,
|
nodeTree[i].node,
|
||||||
delimiter
|
delimiter,
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -48,14 +48,14 @@ export class ServiceUtils {
|
|||||||
[newPartName, ...parts.slice(partIndex + 2)],
|
[newPartName, ...parts.slice(partIndex + 2)],
|
||||||
obj,
|
obj,
|
||||||
parent,
|
parent,
|
||||||
delimiter
|
delimiter,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static getTreeNodeObject(
|
static getTreeNodeObject(
|
||||||
nodeTree: TreeNode<ITreeNodeObject>[],
|
nodeTree: TreeNode<ITreeNodeObject>[],
|
||||||
id: string
|
id: string,
|
||||||
): TreeNode<ITreeNodeObject> {
|
): TreeNode<ITreeNodeObject> {
|
||||||
for (let i = 0; i < nodeTree.length; i++) {
|
for (let i = 0; i < nodeTree.length; i++) {
|
||||||
if (nodeTree[i].node.id === id) {
|
if (nodeTree[i].node.id === id) {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export function throttle(limit: number, throttleKey: (args: any[]) => string) {
|
|||||||
return <T>(
|
return <T>(
|
||||||
target: any,
|
target: any,
|
||||||
propertyKey: string | symbol,
|
propertyKey: string | symbol,
|
||||||
descriptor: TypedPropertyDescriptor<(...args: any[]) => Promise<T>>
|
descriptor: TypedPropertyDescriptor<(...args: any[]) => Promise<T>>,
|
||||||
) => {
|
) => {
|
||||||
const originalMethod: () => Promise<T> = descriptor.value;
|
const originalMethod: () => Promise<T> = descriptor.value;
|
||||||
const allThrottles = new Map<any, Map<string, (() => void)[]>>();
|
const allThrottles = new Map<any, Map<string, (() => void)[]>>();
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
/* eslint-disable no-useless-escape */
|
/* eslint-disable no-useless-escape */
|
||||||
|
import { I18nService } from "../abstractions/i18n.service";
|
||||||
|
|
||||||
import * as tldjs from "tldjs";
|
import * as tldjs from "tldjs";
|
||||||
|
|
||||||
import { I18nService } from "../abstractions/i18n.service";
|
|
||||||
|
|
||||||
const nodeURL = typeof window === "undefined" ? require("url") : null;
|
const nodeURL = typeof window === "undefined" ? require("url") : null;
|
||||||
|
|
||||||
@@ -185,7 +186,7 @@ export class Utils {
|
|||||||
static isGuid(id: string) {
|
static isGuid(id: string) {
|
||||||
return RegExp(
|
return RegExp(
|
||||||
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/,
|
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/,
|
||||||
"i"
|
"i",
|
||||||
).test(id);
|
).test(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -279,7 +280,7 @@ export class Utils {
|
|||||||
}
|
}
|
||||||
map.set(
|
map.set(
|
||||||
decodeURIComponent(parts[0]).toLowerCase(),
|
decodeURIComponent(parts[0]).toLowerCase(),
|
||||||
parts[1] == null ? "" : decodeURIComponent(parts[1])
|
parts[1] == null ? "" : decodeURIComponent(parts[1]),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
return map;
|
return map;
|
||||||
@@ -359,10 +360,10 @@ export class Utils {
|
|||||||
((a) => {
|
((a) => {
|
||||||
if (
|
if (
|
||||||
/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(
|
/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(
|
||||||
a
|
a,
|
||||||
) ||
|
) ||
|
||||||
/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(
|
/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(
|
||||||
a.substr(0, 4)
|
a.substr(0, 4),
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
mobile = true;
|
mobile = true;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export class WebAuthnIFrame {
|
|||||||
private i18nService: I18nService,
|
private i18nService: I18nService,
|
||||||
private successCallback: Function, // eslint-disable-line
|
private successCallback: Function, // eslint-disable-line
|
||||||
private errorCallback: Function, // eslint-disable-line
|
private errorCallback: Function, // eslint-disable-line
|
||||||
private infoCallback: Function // eslint-disable-line
|
private infoCallback: Function, // eslint-disable-line
|
||||||
) {
|
) {
|
||||||
this.connectorLink = win.document.createElement("a");
|
this.connectorLink = win.document.createElement("a");
|
||||||
}
|
}
|
||||||
@@ -31,7 +31,7 @@ export class WebAuthnIFrame {
|
|||||||
// Firefox fallback which opens the webauthn page in a new tab
|
// Firefox fallback which opens the webauthn page in a new tab
|
||||||
params.append("locale", this.i18nService.translationLocale);
|
params.append("locale", this.i18nService.translationLocale);
|
||||||
this.platformUtilsService.launchUri(
|
this.platformUtilsService.launchUri(
|
||||||
`${this.webVaultUrl}/webauthn-fallback-connector.html?${params}`
|
`${this.webVaultUrl}/webauthn-fallback-connector.html?${params}`,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this.connectorLink.href = `${this.webVaultUrl}/webauthn-connector.html?${params}`;
|
this.connectorLink.href = `${this.webVaultUrl}/webauthn-connector.html?${params}`;
|
||||||
@@ -63,7 +63,7 @@ export class WebAuthnIFrame {
|
|||||||
return btoa(
|
return btoa(
|
||||||
encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (match, p1) => {
|
encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (match, p1) => {
|
||||||
return String.fromCharCode(("0x" + p1) as any);
|
return String.fromCharCode(("0x" + p1) as any);
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -126,10 +126,10 @@ export class SsoConfigApi extends BaseResponse {
|
|||||||
this.idpX509PublicCert = this.getResponseProperty("IdpX509PublicCert");
|
this.idpX509PublicCert = this.getResponseProperty("IdpX509PublicCert");
|
||||||
this.idpOutboundSigningAlgorithm = this.getResponseProperty("IdpOutboundSigningAlgorithm");
|
this.idpOutboundSigningAlgorithm = this.getResponseProperty("IdpOutboundSigningAlgorithm");
|
||||||
this.idpAllowUnsolicitedAuthnResponse = this.getResponseProperty(
|
this.idpAllowUnsolicitedAuthnResponse = this.getResponseProperty(
|
||||||
"IdpAllowUnsolicitedAuthnResponse"
|
"IdpAllowUnsolicitedAuthnResponse",
|
||||||
);
|
);
|
||||||
this.idpDisableOutboundLogoutRequests = this.getResponseProperty(
|
this.idpDisableOutboundLogoutRequests = this.getResponseProperty(
|
||||||
"IdpDisableOutboundLogoutRequests"
|
"IdpDisableOutboundLogoutRequests",
|
||||||
);
|
);
|
||||||
this.idpWantAuthnRequestsSigned = this.getResponseProperty("IdpWantAuthnRequestsSigned");
|
this.idpWantAuthnRequestsSigned = this.getResponseProperty("IdpWantAuthnRequestsSigned");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export class Attachment extends Domain {
|
|||||||
fileName: null,
|
fileName: null,
|
||||||
key: null,
|
key: null,
|
||||||
},
|
},
|
||||||
["id", "url", "sizeName"]
|
["id", "url", "sizeName"],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ export class Attachment extends Domain {
|
|||||||
fileName: null,
|
fileName: null,
|
||||||
},
|
},
|
||||||
orgId,
|
orgId,
|
||||||
encKey
|
encKey,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (this.key != null) {
|
if (this.key != null) {
|
||||||
@@ -80,7 +80,7 @@ export class Attachment extends Domain {
|
|||||||
fileName: null,
|
fileName: null,
|
||||||
key: null,
|
key: null,
|
||||||
},
|
},
|
||||||
["id", "url", "sizeName"]
|
["id", "url", "sizeName"],
|
||||||
);
|
);
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export class Card extends Domain {
|
|||||||
expYear: null,
|
expYear: null,
|
||||||
code: null,
|
code: null,
|
||||||
},
|
},
|
||||||
[]
|
[],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ export class Card extends Domain {
|
|||||||
code: null,
|
code: null,
|
||||||
},
|
},
|
||||||
orgId,
|
orgId,
|
||||||
encKey
|
encKey,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export class Cipher extends Domain {
|
|||||||
name: null,
|
name: null,
|
||||||
notes: null,
|
notes: null,
|
||||||
},
|
},
|
||||||
["id", "userId", "organizationId", "folderId"]
|
["id", "userId", "organizationId", "folderId"],
|
||||||
);
|
);
|
||||||
|
|
||||||
this.type = obj.type;
|
this.type = obj.type;
|
||||||
@@ -119,7 +119,7 @@ export class Cipher extends Domain {
|
|||||||
notes: null,
|
notes: null,
|
||||||
},
|
},
|
||||||
this.organizationId,
|
this.organizationId,
|
||||||
encKey
|
encKey,
|
||||||
);
|
);
|
||||||
|
|
||||||
switch (this.type) {
|
switch (this.type) {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export class Collection extends Domain {
|
|||||||
readOnly: null,
|
readOnly: null,
|
||||||
hidePasswords: null,
|
hidePasswords: null,
|
||||||
},
|
},
|
||||||
["id", "organizationId", "externalId", "readOnly", "hidePasswords"]
|
["id", "organizationId", "externalId", "readOnly", "hidePasswords"],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ export class Collection extends Domain {
|
|||||||
{
|
{
|
||||||
name: null,
|
name: null,
|
||||||
},
|
},
|
||||||
this.organizationId
|
this.organizationId,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export default class Domain {
|
|||||||
domain: D,
|
domain: D,
|
||||||
dataObj: any,
|
dataObj: any,
|
||||||
map: any,
|
map: any,
|
||||||
notEncList: any[] = []
|
notEncList: any[] = [],
|
||||||
) {
|
) {
|
||||||
for (const prop in map) {
|
for (const prop in map) {
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
@@ -28,7 +28,7 @@ export default class Domain {
|
|||||||
domain: D,
|
domain: D,
|
||||||
dataObj: any,
|
dataObj: any,
|
||||||
map: any,
|
map: any,
|
||||||
notEncStringList: any[] = []
|
notEncStringList: any[] = [],
|
||||||
) {
|
) {
|
||||||
for (const prop in map) {
|
for (const prop in map) {
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
@@ -49,7 +49,7 @@ export default class Domain {
|
|||||||
viewModel: T,
|
viewModel: T,
|
||||||
map: any,
|
map: any,
|
||||||
orgId: string,
|
orgId: string,
|
||||||
key: SymmetricCryptoKey = null
|
key: SymmetricCryptoKey = null,
|
||||||
): Promise<T> {
|
): Promise<T> {
|
||||||
const promises = [];
|
const promises = [];
|
||||||
const self: any = this;
|
const self: any = this;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export class EncString {
|
|||||||
encryptedStringOrType: string | EncryptionType,
|
encryptedStringOrType: string | EncryptionType,
|
||||||
data?: string,
|
data?: string,
|
||||||
iv?: string,
|
iv?: string,
|
||||||
mac?: string
|
mac?: string,
|
||||||
) {
|
) {
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
// data and header
|
// data and header
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export class Field extends Domain {
|
|||||||
name: null,
|
name: null,
|
||||||
value: null,
|
value: null,
|
||||||
},
|
},
|
||||||
[]
|
[],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ export class Field extends Domain {
|
|||||||
value: null,
|
value: null,
|
||||||
},
|
},
|
||||||
orgId,
|
orgId,
|
||||||
encKey
|
encKey,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ export class Field extends Domain {
|
|||||||
type: null,
|
type: null,
|
||||||
linkedId: null,
|
linkedId: null,
|
||||||
},
|
},
|
||||||
["type", "linkedId"]
|
["type", "linkedId"],
|
||||||
);
|
);
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export class Folder extends Domain {
|
|||||||
id: null,
|
id: null,
|
||||||
name: null,
|
name: null,
|
||||||
},
|
},
|
||||||
["id"]
|
["id"],
|
||||||
);
|
);
|
||||||
|
|
||||||
this.revisionDate = obj.revisionDate != null ? new Date(obj.revisionDate) : null;
|
this.revisionDate = obj.revisionDate != null ? new Date(obj.revisionDate) : null;
|
||||||
@@ -34,7 +34,7 @@ export class Folder extends Domain {
|
|||||||
{
|
{
|
||||||
name: null,
|
name: null,
|
||||||
},
|
},
|
||||||
null
|
null,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export class Identity extends Domain {
|
|||||||
passportNumber: null,
|
passportNumber: null,
|
||||||
licenseNumber: null,
|
licenseNumber: null,
|
||||||
},
|
},
|
||||||
[]
|
[],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ export class Identity extends Domain {
|
|||||||
licenseNumber: null,
|
licenseNumber: null,
|
||||||
},
|
},
|
||||||
orgId,
|
orgId,
|
||||||
encKey
|
encKey,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export class PasswordLogInCredentials {
|
|||||||
public email: string,
|
public email: string,
|
||||||
public masterPassword: string,
|
public masterPassword: string,
|
||||||
public captchaToken?: string,
|
public captchaToken?: string,
|
||||||
public twoFactor?: TokenRequestTwoFactor
|
public twoFactor?: TokenRequestTwoFactor,
|
||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -20,12 +20,15 @@ export class SsoLogInCredentials {
|
|||||||
public codeVerifier: string,
|
public codeVerifier: string,
|
||||||
public redirectUrl: string,
|
public redirectUrl: string,
|
||||||
public orgId: string,
|
public orgId: string,
|
||||||
public twoFactor?: TokenRequestTwoFactor
|
public twoFactor?: TokenRequestTwoFactor,
|
||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ApiLogInCredentials {
|
export class ApiLogInCredentials {
|
||||||
readonly type = AuthenticationType.Api;
|
readonly type = AuthenticationType.Api;
|
||||||
|
|
||||||
constructor(public clientId: string, public clientSecret: string) {}
|
constructor(
|
||||||
|
public clientId: string,
|
||||||
|
public clientSecret: string,
|
||||||
|
) {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export class Login extends Domain {
|
|||||||
password: null,
|
password: null,
|
||||||
totp: null,
|
totp: null,
|
||||||
},
|
},
|
||||||
[]
|
[],
|
||||||
);
|
);
|
||||||
|
|
||||||
if (obj.uris) {
|
if (obj.uris) {
|
||||||
@@ -51,7 +51,7 @@ export class Login extends Domain {
|
|||||||
totp: null,
|
totp: null,
|
||||||
},
|
},
|
||||||
orgId,
|
orgId,
|
||||||
encKey
|
encKey,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (this.uris != null) {
|
if (this.uris != null) {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export class LoginUri extends Domain {
|
|||||||
{
|
{
|
||||||
uri: null,
|
uri: null,
|
||||||
},
|
},
|
||||||
[]
|
[],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ export class LoginUri extends Domain {
|
|||||||
uri: null,
|
uri: null,
|
||||||
},
|
},
|
||||||
orgId,
|
orgId,
|
||||||
encKey
|
encKey,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ export class LoginUri extends Domain {
|
|||||||
uri: null,
|
uri: null,
|
||||||
match: null,
|
match: null,
|
||||||
},
|
},
|
||||||
["match"]
|
["match"],
|
||||||
);
|
);
|
||||||
return u;
|
return u;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export class Password extends Domain {
|
|||||||
password: null,
|
password: null,
|
||||||
},
|
},
|
||||||
orgId,
|
orgId,
|
||||||
encKey
|
encKey,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export class Send extends Domain {
|
|||||||
notes: null,
|
notes: null,
|
||||||
key: null,
|
key: null,
|
||||||
},
|
},
|
||||||
["id", "accessId", "userId"]
|
["id", "accessId", "userId"],
|
||||||
);
|
);
|
||||||
|
|
||||||
this.type = obj.type;
|
this.type = obj.type;
|
||||||
@@ -95,7 +95,7 @@ export class Send extends Domain {
|
|||||||
notes: null,
|
notes: null,
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
model.cryptoKey
|
model.cryptoKey,
|
||||||
);
|
);
|
||||||
|
|
||||||
switch (this.type) {
|
switch (this.type) {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export class SendAccess extends Domain {
|
|||||||
expirationDate: null,
|
expirationDate: null,
|
||||||
creatorIdentifier: null,
|
creatorIdentifier: null,
|
||||||
},
|
},
|
||||||
["id", "expirationDate", "creatorIdentifier"]
|
["id", "expirationDate", "creatorIdentifier"],
|
||||||
);
|
);
|
||||||
|
|
||||||
this.type = obj.type;
|
this.type = obj.type;
|
||||||
@@ -58,7 +58,7 @@ export class SendAccess extends Domain {
|
|||||||
name: null,
|
name: null,
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
key
|
key,
|
||||||
);
|
);
|
||||||
|
|
||||||
switch (this.type) {
|
switch (this.type) {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export class SendFile extends Domain {
|
|||||||
sizeName: null,
|
sizeName: null,
|
||||||
fileName: null,
|
fileName: null,
|
||||||
},
|
},
|
||||||
["id", "sizeName"]
|
["id", "sizeName"],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ export class SendFile extends Domain {
|
|||||||
fileName: null,
|
fileName: null,
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
key
|
key,
|
||||||
);
|
);
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export class SendText extends Domain {
|
|||||||
{
|
{
|
||||||
text: null,
|
text: null,
|
||||||
},
|
},
|
||||||
[]
|
[],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ export class SendText extends Domain {
|
|||||||
text: null,
|
text: null,
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
key
|
key,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export class SortedCiphersCache {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.sortedCiphersByUrl.delete(url);
|
this.sortedCiphersByUrl.delete(url);
|
||||||
this.timeouts.delete(url);
|
this.timeouts.delete(url);
|
||||||
}, CacheTTL)
|
}, CacheTTL),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -68,7 +68,7 @@ class Ciphers {
|
|||||||
getLastLaunched() {
|
getLastLaunched() {
|
||||||
const usedCiphers = this.ciphers.filter((cipher) => cipher.localData?.lastLaunched);
|
const usedCiphers = this.ciphers.filter((cipher) => cipher.localData?.lastLaunched);
|
||||||
const sortedCiphers = usedCiphers.sort(
|
const sortedCiphers = usedCiphers.sort(
|
||||||
(x, y) => y.localData.lastLaunched.valueOf() - x.localData.lastLaunched.valueOf()
|
(x, y) => y.localData.lastLaunched.valueOf() - x.localData.lastLaunched.valueOf(),
|
||||||
);
|
);
|
||||||
return sortedCiphers[0];
|
return sortedCiphers[0];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { GlobalState } from "./globalState";
|
|||||||
|
|
||||||
export class State<
|
export class State<
|
||||||
TGlobalState extends GlobalState = GlobalState,
|
TGlobalState extends GlobalState = GlobalState,
|
||||||
TAccount extends Account = Account
|
TAccount extends Account = Account,
|
||||||
> {
|
> {
|
||||||
accounts: { [userId: string]: TAccount } = {};
|
accounts: { [userId: string]: TAccount } = {};
|
||||||
globals: TGlobalState;
|
globals: TGlobalState;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export class SetKeyConnectorKeyRequest {
|
|||||||
kdf: KdfType,
|
kdf: KdfType,
|
||||||
kdfIterations: number,
|
kdfIterations: number,
|
||||||
orgIdentifier: string,
|
orgIdentifier: string,
|
||||||
keys: KeysRequest
|
keys: KeysRequest,
|
||||||
) {
|
) {
|
||||||
this.key = key;
|
this.key = key;
|
||||||
this.kdf = kdf;
|
this.kdf = kdf;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export class ApiTokenRequest extends TokenRequest {
|
|||||||
public clientId: string,
|
public clientId: string,
|
||||||
public clientSecret: string,
|
public clientSecret: string,
|
||||||
protected twoFactor: TokenRequestTwoFactor,
|
protected twoFactor: TokenRequestTwoFactor,
|
||||||
device?: DeviceRequest
|
device?: DeviceRequest,
|
||||||
) {
|
) {
|
||||||
super(twoFactor, device);
|
super(twoFactor, device);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export class PasswordTokenRequest extends TokenRequest implements CaptchaProtect
|
|||||||
public masterPasswordHash: string,
|
public masterPasswordHash: string,
|
||||||
public captchaResponse: string,
|
public captchaResponse: string,
|
||||||
protected twoFactor: TokenRequestTwoFactor,
|
protected twoFactor: TokenRequestTwoFactor,
|
||||||
device?: DeviceRequest
|
device?: DeviceRequest,
|
||||||
) {
|
) {
|
||||||
super(twoFactor, device);
|
super(twoFactor, device);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export class SsoTokenRequest extends TokenRequest {
|
|||||||
public codeVerifier: string,
|
public codeVerifier: string,
|
||||||
public redirectUri: string,
|
public redirectUri: string,
|
||||||
protected twoFactor: TokenRequestTwoFactor,
|
protected twoFactor: TokenRequestTwoFactor,
|
||||||
device?: DeviceRequest
|
device?: DeviceRequest,
|
||||||
) {
|
) {
|
||||||
super(twoFactor, device);
|
super(twoFactor, device);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,10 @@ import { TokenRequestTwoFactor } from "./tokenRequestTwoFactor";
|
|||||||
export abstract class TokenRequest {
|
export abstract class TokenRequest {
|
||||||
protected device?: DeviceRequest;
|
protected device?: DeviceRequest;
|
||||||
|
|
||||||
constructor(protected twoFactor: TokenRequestTwoFactor, device?: DeviceRequest) {
|
constructor(
|
||||||
|
protected twoFactor: TokenRequestTwoFactor,
|
||||||
|
device?: DeviceRequest,
|
||||||
|
) {
|
||||||
this.device = device != null ? device : null;
|
this.device = device != null ? device : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ export class TokenRequestTwoFactor {
|
|||||||
constructor(
|
constructor(
|
||||||
public provider: TwoFactorProviderType = null,
|
public provider: TwoFactorProviderType = null,
|
||||||
public token: string = null,
|
public token: string = null,
|
||||||
public remember: boolean = false
|
public remember: boolean = false,
|
||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export class OrganizationImportRequest {
|
|||||||
overwriteExisting: boolean;
|
overwriteExisting: boolean;
|
||||||
largeImport: boolean;
|
largeImport: boolean;
|
||||||
}
|
}
|
||||||
| ImportDirectoryRequest
|
| ImportDirectoryRequest,
|
||||||
) {
|
) {
|
||||||
if (model instanceof ImportDirectoryRequest) {
|
if (model instanceof ImportDirectoryRequest) {
|
||||||
this.groups = model.groups.map((g) => new OrganizationImportGroupRequest(g));
|
this.groups = model.groups.map((g) => new OrganizationImportGroupRequest(g));
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
export class OrganizationSubscriptionUpdateRequest {
|
export class OrganizationSubscriptionUpdateRequest {
|
||||||
constructor(public seatAdjustment: number, public maxAutoscaleSeats?: number) {}
|
constructor(
|
||||||
|
public seatAdjustment: number,
|
||||||
|
public maxAutoscaleSeats?: number,
|
||||||
|
) {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ import { OrganizationCreateRequest } from "../organizationCreateRequest";
|
|||||||
export class ProviderOrganizationCreateRequest {
|
export class ProviderOrganizationCreateRequest {
|
||||||
constructor(
|
constructor(
|
||||||
public clientOwnerEmail: string,
|
public clientOwnerEmail: string,
|
||||||
public organizationCreateRequest: OrganizationCreateRequest
|
public organizationCreateRequest: OrganizationCreateRequest,
|
||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export class RegisterRequest implements CaptchaProtectedRequest {
|
|||||||
public kdf: KdfType,
|
public kdf: KdfType,
|
||||||
public kdfIterations: number,
|
public kdfIterations: number,
|
||||||
public referenceData: ReferenceEventRequest,
|
public referenceData: ReferenceEventRequest,
|
||||||
public captchaResponse: string
|
public captchaResponse: string,
|
||||||
) {
|
) {
|
||||||
this.masterPasswordHint = masterPasswordHint ? masterPasswordHint : null;
|
this.masterPasswordHint = masterPasswordHint ? masterPasswordHint : null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ export class SetPasswordRequest {
|
|||||||
kdf: KdfType,
|
kdf: KdfType,
|
||||||
kdfIterations: number,
|
kdfIterations: number,
|
||||||
orgIdentifier: string,
|
orgIdentifier: string,
|
||||||
keys: KeysRequest
|
keys: KeysRequest,
|
||||||
) {
|
) {
|
||||||
this.masterPasswordHash = masterPasswordHash;
|
this.masterPasswordHash = masterPasswordHash;
|
||||||
this.key = key;
|
this.key = key;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export abstract class BaseResponse {
|
|||||||
protected getResponseProperty(
|
protected getResponseProperty(
|
||||||
propertyName: string,
|
propertyName: string,
|
||||||
response: any = null,
|
response: any = null,
|
||||||
exactName = false
|
exactName = false,
|
||||||
): any {
|
): any {
|
||||||
if (propertyName == null || propertyName === "") {
|
if (propertyName == null || propertyName === "") {
|
||||||
throw new Error("propertyName must not be null/empty.");
|
throw new Error("propertyName must not be null/empty.");
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export class DomainsResponse extends BaseResponse {
|
|||||||
const globalEquivalentDomains = this.getResponseProperty("GlobalEquivalentDomains");
|
const globalEquivalentDomains = this.getResponseProperty("GlobalEquivalentDomains");
|
||||||
if (globalEquivalentDomains != null) {
|
if (globalEquivalentDomains != null) {
|
||||||
this.globalEquivalentDomains = globalEquivalentDomains.map(
|
this.globalEquivalentDomains = globalEquivalentDomains.map(
|
||||||
(d: any) => new GlobalDomainResponse(d)
|
(d: any) => new GlobalDomainResponse(d),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this.globalEquivalentDomains = [];
|
this.globalEquivalentDomains = [];
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export class ProfileResponse extends BaseResponse {
|
|||||||
const providerOrganizations = this.getResponseProperty("ProviderOrganizations");
|
const providerOrganizations = this.getResponseProperty("ProviderOrganizations");
|
||||||
if (providerOrganizations != null) {
|
if (providerOrganizations != null) {
|
||||||
this.providerOrganizations = providerOrganizations.map(
|
this.providerOrganizations = providerOrganizations.map(
|
||||||
(o: any) => new ProfileProviderOrganizationResponse(o)
|
(o: any) => new ProfileProviderOrganizationResponse(o),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -11,7 +11,7 @@ const PwnedPasswordsApi = "https://api.pwnedpasswords.com/range/";
|
|||||||
export class AuditService implements AuditServiceAbstraction {
|
export class AuditService implements AuditServiceAbstraction {
|
||||||
constructor(
|
constructor(
|
||||||
private cryptoFunctionService: CryptoFunctionService,
|
private cryptoFunctionService: CryptoFunctionService,
|
||||||
private apiService: ApiService
|
private apiService: ApiService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
@throttle(100, () => "passwordLeaked")
|
@throttle(100, () => "passwordLeaked")
|
||||||
|
|||||||
@@ -55,11 +55,11 @@ export class AuthService implements AuthServiceAbstraction {
|
|||||||
protected environmentService: EnvironmentService,
|
protected environmentService: EnvironmentService,
|
||||||
protected stateService: StateService,
|
protected stateService: StateService,
|
||||||
protected twoFactorService: TwoFactorService,
|
protected twoFactorService: TwoFactorService,
|
||||||
protected i18nService: I18nService
|
protected i18nService: I18nService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async logIn(
|
async logIn(
|
||||||
credentials: ApiLogInCredentials | PasswordLogInCredentials | SsoLogInCredentials
|
credentials: ApiLogInCredentials | PasswordLogInCredentials | SsoLogInCredentials,
|
||||||
): Promise<AuthResult> {
|
): Promise<AuthResult> {
|
||||||
this.clearState();
|
this.clearState();
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ export class AuthService implements AuthServiceAbstraction {
|
|||||||
this.logService,
|
this.logService,
|
||||||
this.stateService,
|
this.stateService,
|
||||||
this.twoFactorService,
|
this.twoFactorService,
|
||||||
this
|
this,
|
||||||
);
|
);
|
||||||
} else if (credentials.type === AuthenticationType.Sso) {
|
} else if (credentials.type === AuthenticationType.Sso) {
|
||||||
strategy = new SsoLogInStrategy(
|
strategy = new SsoLogInStrategy(
|
||||||
@@ -89,7 +89,7 @@ export class AuthService implements AuthServiceAbstraction {
|
|||||||
this.logService,
|
this.logService,
|
||||||
this.stateService,
|
this.stateService,
|
||||||
this.twoFactorService,
|
this.twoFactorService,
|
||||||
this.keyConnectorService
|
this.keyConnectorService,
|
||||||
);
|
);
|
||||||
} else if (credentials.type === AuthenticationType.Api) {
|
} else if (credentials.type === AuthenticationType.Api) {
|
||||||
strategy = new ApiLogInStrategy(
|
strategy = new ApiLogInStrategy(
|
||||||
@@ -103,7 +103,7 @@ export class AuthService implements AuthServiceAbstraction {
|
|||||||
this.stateService,
|
this.stateService,
|
||||||
this.twoFactorService,
|
this.twoFactorService,
|
||||||
this.environmentService,
|
this.environmentService,
|
||||||
this.keyConnectorService
|
this.keyConnectorService,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ export class AuthService implements AuthServiceAbstraction {
|
|||||||
|
|
||||||
async logInTwoFactor(
|
async logInTwoFactor(
|
||||||
twoFactor: TokenRequestTwoFactor,
|
twoFactor: TokenRequestTwoFactor,
|
||||||
captchaResponse: string
|
captchaResponse: string,
|
||||||
): Promise<AuthResult> {
|
): Promise<AuthResult> {
|
||||||
if (this.logInStrategy == null) {
|
if (this.logInStrategy == null) {
|
||||||
throw new Error(this.i18nService.t("sessionTimeout"));
|
throw new Error(this.i18nService.t("sessionTimeout"));
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export class AzureFileUploadService {
|
|||||||
private async azureUploadBlocks(
|
private async azureUploadBlocks(
|
||||||
url: string,
|
url: string,
|
||||||
data: EncArrayBuffer,
|
data: EncArrayBuffer,
|
||||||
renewalCallback: () => Promise<string>
|
renewalCallback: () => Promise<string>,
|
||||||
) {
|
) {
|
||||||
const baseUrl = Utils.getUrl(url);
|
const baseUrl = Utils.getUrl(url);
|
||||||
const blockSize = this.getMaxBlockSize(baseUrl.searchParams.get("sv"));
|
const blockSize = this.getMaxBlockSize(baseUrl.searchParams.get("sv"));
|
||||||
@@ -50,7 +50,7 @@ export class AzureFileUploadService {
|
|||||||
|
|
||||||
if (numBlocks > MAX_BLOCKS_PER_BLOB) {
|
if (numBlocks > MAX_BLOCKS_PER_BLOB) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Cannot upload file, exceeds maximum size of ${blockSize * MAX_BLOCKS_PER_BLOB}`
|
`Cannot upload file, exceeds maximum size of ${blockSize * MAX_BLOCKS_PER_BLOB}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ export class AzureFileUploadService {
|
|||||||
|
|
||||||
private async renewUrlIfNecessary(
|
private async renewUrlIfNecessary(
|
||||||
url: string,
|
url: string,
|
||||||
renewalCallback: () => Promise<string>
|
renewalCallback: () => Promise<string>,
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
const urlObject = Utils.getUrl(url);
|
const urlObject = Utils.getUrl(url);
|
||||||
const expiry = new Date(urlObject.searchParams.get("se") ?? "");
|
const expiry = new Date(urlObject.searchParams.get("se") ?? "");
|
||||||
@@ -183,10 +183,10 @@ class Version {
|
|||||||
return a.year !== b.year
|
return a.year !== b.year
|
||||||
? a.year - b.year
|
? a.year - b.year
|
||||||
: a.month !== b.month
|
: a.month !== b.month
|
||||||
? a.month - b.month
|
? a.month - b.month
|
||||||
: a.day !== b.day
|
: a.day !== b.day
|
||||||
? a.day - b.day
|
? a.day - b.day
|
||||||
: 0;
|
: 0;
|
||||||
}
|
}
|
||||||
year = 0;
|
year = 0;
|
||||||
month = 0;
|
month = 0;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user