-
Notifications
You must be signed in to change notification settings - Fork 45
Edge TB: changes related to GetToken, Fixes AB#3317102 #2803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
21c3ed2
1276de7
cf872e1
1378c50
8f04dd0
addd84a
3672ba1
075440c
f813536
6e5b3c3
456e0d5
c7cb41d
935091d
3eae88b
b53404d
6fbaa31
34d9d6f
7b2876d
84ea614
17b851a
262e689
a763095
19e573f
8a1d9ff
27f6cf2
827d081
7f0003d
94338cd
5ac74ca
bfc8ed3
699c860
14ae0ea
3669d6d
0eebf03
65ad998
4f6a4e6
5309bb5
d8f7af8
938d27e
a53b257
7f362b5
a98544a
391eab5
3c3b36d
191ad5b
629b232
1a6dfba
dc07634
5c2484b
42061ce
a212d9f
1f42ada
e3c2f5a
3c88be3
f8fbdf8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -84,6 +84,8 @@ private static final class SerializedNames { | |
| final static String SIGN_IN_WITH_GOOGLE_CREDENTIAL = "sign_in_with_google_credential"; | ||
|
|
||
| final static String TENANT_ID = "tenant_id"; | ||
| final static String REQUEST_TYPE = "request_type"; | ||
| final static String WEB_APPS_STATE = "web_apps_state"; | ||
| } | ||
|
|
||
| /** | ||
|
|
@@ -281,4 +283,15 @@ private static final class SerializedNames { | |
| @Nullable | ||
| @SerializedName(SerializedNames.TENANT_ID) | ||
| private String mTenantId; | ||
|
|
||
| @Nullable | ||
| @SerializedName(SerializedNames.REQUEST_TYPE) | ||
| private String mRequestType; | ||
|
|
||
| /** | ||
| * State for web apps requests. Make sure not to log this. | ||
| */ | ||
| @Nullable | ||
| @SerializedName(SerializedNames.WEB_APPS_STATE) | ||
| private String mWebAppsState; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To allow AccountChooserActivity to return a result as a string we can return directly to the caller (without BrokerMsalController interfering too much), we pass the state webapp parameter so that AccountChooserActivity can include it in the result. |
||
| } | ||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,6 +50,7 @@ | |
| import com.microsoft.identity.common.java.commands.ICommand; | ||
| import com.microsoft.identity.common.java.commands.InteractiveTokenCommand; | ||
| import com.microsoft.identity.common.java.commands.parameters.InteractiveTokenCommandParameters; | ||
| import com.microsoft.identity.common.java.exception.ArgumentException; | ||
| import com.microsoft.identity.common.java.exception.ClientException; | ||
| import com.microsoft.identity.common.java.exception.ErrorStrings; | ||
| import com.microsoft.identity.common.java.flighting.CommonFlight; | ||
|
|
@@ -161,6 +162,11 @@ public boolean isValidCallingApp(@NonNull String redirectUri, @NonNull String pa | |
| return isValidBrokerRedirect; | ||
| } | ||
|
|
||
| @Override | ||
| public void isValidCallingAppForWebApps(int callingUid) throws ClientException, UnsupportedOperationException { | ||
| // This operation is not supported in non-broker contexts. | ||
| throw new UnsupportedOperationException("WebApp APIs are not functional in non-broker scenarios."); | ||
| } | ||
| @Override | ||
| @Nullable | ||
| public String getEnrollmentId(@NonNull final String userId, @NonNull final String packageName) { | ||
|
|
@@ -324,4 +330,8 @@ private boolean isValidHubRedirectURIForNAATests(String redirectUri) { | |
| || redirectUri.equals("msauth://com.microsoft.teams/fcg80qvoM1YMKJZibjBwQcDfOno=") | ||
| || redirectUri.equals("https://login.microsoftonline.com/common/oauth2/nativeclient")); | ||
| } | ||
|
|
||
| protected Context getContext() { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is this one used?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AndroidBrokerPlatformUtil.isValidCallingAppForWebApps... used for validating that the caller app is in our designated allowlist |
||
| return mContext; | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just making these values more specific