|
22 | 22 | // THE SOFTWARE. |
23 | 23 | package com.microsoft.identity.common.internal.providers.oauth2 |
24 | 24 |
|
| 25 | +import com.microsoft.identity.common.BuildConfig |
25 | 26 | import com.microsoft.identity.common.logging.Logger |
26 | 27 | import java.net.URI |
27 | 28 |
|
@@ -65,6 +66,13 @@ object PasskeyOriginRulesManager { |
65 | 66 | "https://login.sovcloud-identity.sg" |
66 | 67 | ) |
67 | 68 |
|
| 69 | + // PPE origins |
| 70 | + private val ALLOWED_ORIGIN_PPE= setOf( |
| 71 | + "https://account.live-int.com", |
| 72 | + "https://login.windows-ppe.net", |
| 73 | + "https://mysignins-ppe.microsoft.com" |
| 74 | + ) |
| 75 | + |
68 | 76 | /** |
69 | 77 | * Checks if the provided URL is allowed to access Passkey/WebAuthN APIs. |
70 | 78 | * |
@@ -104,7 +112,7 @@ object PasskeyOriginRulesManager { |
104 | 112 |
|
105 | 113 | false |
106 | 114 | } catch (throwable: Throwable) { |
107 | | - Logger.error(TAG, "Error validating origin for URL: $url.", throwable) |
| 115 | + Logger.error(TAG, "Error validating origin for URL.", throwable) |
108 | 116 | false |
109 | 117 | } |
110 | 118 | } |
@@ -143,6 +151,10 @@ object PasskeyOriginRulesManager { |
143 | 151 | * @return Set containing all production and sovereign cloud origin URLs |
144 | 152 | */ |
145 | 153 | fun getAllowedOriginRules(): Set<String> { |
146 | | - return PRODUCTION_ORIGINS + SOVEREIGN_CLOUD_ORIGINS |
| 154 | + return if (BuildConfig.DEBUG) { |
| 155 | + PRODUCTION_ORIGINS + SOVEREIGN_CLOUD_ORIGINS + ALLOWED_ORIGIN_PPE |
| 156 | + } else { |
| 157 | + PRODUCTION_ORIGINS + SOVEREIGN_CLOUD_ORIGINS |
| 158 | + } |
147 | 159 | } |
148 | 160 | } |
0 commit comments