[PR #1757] [MERGED] Client & Version headers #3101

Closed
opened 2025-11-26 23:28:18 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1757
Author: @Hinton
Created: 2/8/2022
Status: Merged
Merged: 2/8/2022
Merged by: @Hinton

Base: masterHead: feature/version-header


📝 Commits (1)

  • 4188b83 Add header for client-name and client-version

📊 Changes

5 files changed (+48 additions, -6 deletions)

View changed files

📝 src/App/Pages/Accounts/LoginSsoPageViewModel.cs (+1 -1)
📝 src/App/Services/MobilePlatformUtilsService.cs (+6 -2)
📝 src/Core/Abstractions/IPlatformUtilsService.cs (+1 -2)
src/Core/Enums/ClientType.cs (+36 -0)
📝 src/Core/Services/ApiService.cs (+4 -1)

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Adds two new headers included in each request. I decided to not re-use the DeviceType, since it's more granular.

Bitwarden-Client-Name: [web, browser, desktop, cli, connector, mobile]
Bitwarden-Client-Version: 1.41.0

This will allow us to get an insight into which versions are currently in use.

Code changes

  • platformUtils.service.ts: Added new method, getClientType.
  • clientType.ts: New enum with the client types.

Testing requirements

Should be covered in general regression testing.

Before you submit

  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • This change has particular deployment requirements (notify the DevOps team)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/1757 **Author:** [@Hinton](https://github.com/Hinton) **Created:** 2/8/2022 **Status:** ✅ Merged **Merged:** 2/8/2022 **Merged by:** [@Hinton](https://github.com/Hinton) **Base:** `master` ← **Head:** `feature/version-header` --- ### 📝 Commits (1) - [`4188b83`](https://github.com/bitwarden/android/commit/4188b832f6264085a4781d99ec1e5f87eaf5e82a) Add header for client-name and client-version ### 📊 Changes **5 files changed** (+48 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Pages/Accounts/LoginSsoPageViewModel.cs` (+1 -1) 📝 `src/App/Services/MobilePlatformUtilsService.cs` (+6 -2) 📝 `src/Core/Abstractions/IPlatformUtilsService.cs` (+1 -2) ➕ `src/Core/Enums/ClientType.cs` (+36 -0) 📝 `src/Core/Services/ApiService.cs` (+4 -1) </details> ### 📄 Description ## Type of change - [ ] Bug fix - [x] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> Adds two new headers included in each request. I decided to not re-use the `DeviceType`, since it's more granular. `Bitwarden-Client-Name`: `[web, browser, desktop, cli, connector, mobile]` `Bitwarden-Client-Version`: `1.41.0` This will allow us to get an insight into which versions are currently in use. ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> - **platformUtils.service.ts:** Added new method, `getClientType`. - **clientType.ts:** New enum with the client types. ## Testing requirements <!--What functionality requires testing by QA? This includes testing new behavior and regression testing--> Should be covered in general regression testing. ## Before you submit - [ ] I have added **unit tests** where it makes sense to do so (encouraged but not required) - [ ] This change requires a **documentation update** (notify the documentation team) - [ ] This change has particular **deployment requirements** (notify the DevOps team) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:28:18 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#3101