mirror of
https://github.com/bitwarden/android.git
synced 2026-05-07 19:39:41 -05:00
Update SDK to 2.0.0-6000-b41ccf65 (#6677)
Co-authored-by: bw-ghapp[bot] <178206702+bw-ghapp[bot]@users.noreply.github.com>
This commit is contained in:
@@ -22,11 +22,8 @@ class ServerCommunicationConfigRepositoryImpl(
|
||||
) : ServerCommunicationConfigRepository {
|
||||
|
||||
override suspend fun get(hostname: String): ServerCommunicationConfig? {
|
||||
val serverCommunicationConfig = configDiskSource
|
||||
.serverConfig
|
||||
?.serverData
|
||||
?.communication
|
||||
?: return null
|
||||
val serverData = configDiskSource.serverConfig?.serverData
|
||||
val serverCommunicationConfig = serverData?.communication ?: return null
|
||||
|
||||
if (serverCommunicationConfig.bootstrap.type != "ssoCookieVendor") {
|
||||
return ServerCommunicationConfig(
|
||||
@@ -43,6 +40,7 @@ class ServerCommunicationConfigRepositoryImpl(
|
||||
bootstrap = BootstrapConfig.SsoCookieVendor(
|
||||
v1 = SsoCookieVendorConfig(
|
||||
idpLoginUrl = serverCommunicationConfig.bootstrap.idpLoginUrl,
|
||||
vaultUrl = serverData.environment?.vaultUrl,
|
||||
cookieName = serverCommunicationConfig.bootstrap.cookieName,
|
||||
cookieDomain = serverCommunicationConfig.bootstrap.cookieDomain,
|
||||
cookieValue = acquiredCookies,
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.x8bit.bitwarden.data.platform.datasource.sdk
|
||||
import com.bitwarden.data.datasource.disk.model.ServerConfig
|
||||
import com.bitwarden.data.datasource.disk.util.FakeConfigDiskSource
|
||||
import com.bitwarden.network.model.ConfigResponseJson
|
||||
import com.bitwarden.network.model.ConfigResponseJson.EnvironmentJson
|
||||
import com.bitwarden.servercommunicationconfig.AcquiredCookie
|
||||
import com.bitwarden.servercommunicationconfig.BootstrapConfig
|
||||
import com.bitwarden.servercommunicationconfig.ServerCommunicationConfig
|
||||
@@ -44,6 +45,7 @@ class ServerCommunicationConfigRepositoryTest {
|
||||
fun `get returns ServerCommunicationConfig with cookies when config exists`() = runTest {
|
||||
val hostname = "vault.bitwarden.com"
|
||||
val idpLoginUrl = "https://idp.example.com/login"
|
||||
val vaultUrl = "https://api.bitwarden.com"
|
||||
val cookieName = "session"
|
||||
val cookieDomain = ".example.com"
|
||||
configDiskSource.serverConfig = ServerConfig(
|
||||
@@ -53,7 +55,14 @@ class ServerCommunicationConfigRepositoryTest {
|
||||
version = null,
|
||||
gitHash = null,
|
||||
server = null,
|
||||
environment = null,
|
||||
environment = EnvironmentJson(
|
||||
cloudRegion = null,
|
||||
vaultUrl = vaultUrl,
|
||||
apiUrl = null,
|
||||
identityUrl = null,
|
||||
notificationsUrl = null,
|
||||
ssoUrl = null,
|
||||
),
|
||||
featureStates = null,
|
||||
communication = ConfigResponseJson.CommunicationJson(
|
||||
bootstrap = ConfigResponseJson.CommunicationJson.BootstrapJson(
|
||||
@@ -81,6 +90,7 @@ class ServerCommunicationConfigRepositoryTest {
|
||||
bootstrap = BootstrapConfig.SsoCookieVendor(
|
||||
v1 = SsoCookieVendorConfig(
|
||||
idpLoginUrl = idpLoginUrl,
|
||||
vaultUrl = vaultUrl,
|
||||
cookieName = cookieName,
|
||||
cookieDomain = cookieDomain,
|
||||
cookieValue = listOf(
|
||||
@@ -134,6 +144,7 @@ class ServerCommunicationConfigRepositoryTest {
|
||||
bootstrap = BootstrapConfig.SsoCookieVendor(
|
||||
v1 = SsoCookieVendorConfig(
|
||||
idpLoginUrl = "https://$hostname/proxy-cookie-redirect-connector",
|
||||
vaultUrl = "https://api.bitwarden.com",
|
||||
cookieName = "session",
|
||||
cookieDomain = hostname,
|
||||
cookieValue = listOf(
|
||||
@@ -182,6 +193,7 @@ class ServerCommunicationConfigRepositoryTest {
|
||||
bootstrap = BootstrapConfig.SsoCookieVendor(
|
||||
v1 = SsoCookieVendorConfig(
|
||||
idpLoginUrl = "https://$hostname/proxy-cookie-redirect-connector",
|
||||
vaultUrl = null,
|
||||
cookieName = "session",
|
||||
cookieDomain = hostname,
|
||||
cookieValue = null,
|
||||
|
||||
@@ -30,7 +30,7 @@ androidxRoom = "2.8.4"
|
||||
androidxSecurityCrypto = "1.1.0"
|
||||
androidxSplash = "1.2.0"
|
||||
androidxWork = "2.11.2"
|
||||
bitwardenSdk = "2.0.0-5676-14521973"
|
||||
bitwardenSdk = "2.0.0-6000-b41ccf65"
|
||||
crashlytics = "3.0.6"
|
||||
detekt = "1.23.8"
|
||||
firebaseBom = "34.11.0"
|
||||
|
||||
Reference in New Issue
Block a user