Skip to content

Commit

Permalink
Melissaahn/release/5.3.0 to release/5.3.0 (#2074)
Browse files Browse the repository at this point in the history
### Summary
Cherrypicks:
-
#2069
-
03b851d

---------

Co-authored-by: Dome Pongmongkol <rapong@microsoft.com>
Co-authored-by: amgusain <amgusain@microsoft.com>
  • Loading branch information
3 people committed Apr 13, 2024
1 parent 508a937 commit 033ed2c
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 9 deletions.
7 changes: 6 additions & 1 deletion changelog
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
MSAL Wiki : https://github.com/AzureAD/microsoft-authentication-library-for-android/wiki

vNext
Version 5.3.0
----------
- [MINOR] Give BrokerMsalController higher priority than LocalMsalController if available (#2040)
- [PATCH] Update to common@17.3.0

Version 5.2.1
----------
- [MINOR] Update common @17.2.1

Version 5.2.0
----------
Expand Down
2 changes: 1 addition & 1 deletion msal/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ task sourcesJar(type: Jar) {

// In dev, we want to keep the dependencies (common4j, common) to 1.0.+ to be able to be consumed by daily dev pipeline.
// In release/*, we change these to specific versions being consumed.
def commonVersion = "1.0.+"
def commonVersion = "17.3.0"
if (project.hasProperty("distCommonVersion")) {
commonVersion = project.distCommonVersion
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright (c) Microsoft Corporation.
// All rights reserved.
//
// This code is licensed under the MIT License.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files(the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions :
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
package com.microsoft.identity.client.e2e.shadows

import com.microsoft.identity.common.internal.activebrokerdiscovery.BrokerDiscoveryClient
import com.microsoft.identity.common.internal.broker.BrokerData
import org.robolectric.annotation.Implements

// A Shadow for mocking BrokerDiscoveryClient
@Implements(BrokerDiscoveryClient::class)
class ShadowBrokerDiscoveryClient {

fun getActiveBroker(shouldSkipCache: Boolean): BrokerData? {
return BrokerData.debugBrokerHost
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ public void testDeviceCodeFlowTokenExpiredToken() throws IOException, ClientExce

// Previously authenticated code
tokenRequest.setDeviceCode(
"EAQABAAEAAAAmoFfGtYxvRrNriQdPKIZ-M9DUSILNMIg8XfEpzGyj4l_0HC37z4c7-VhDU8Piig2ap-tfGqcbtyEFR-" +
"Xce4yZ28wEiAFrhVeLXd3JZuqS3xIizNZdzpaPqTFQqiHuztD4ZJPRPyNHIou3J6O6o2a_pJBFyD4egAcUbXwWtJLPg8dsB1UbGfacKZCPuGbtYB0gAA");
"BAQABIQEAAADnfolhJpSnRYB1SVj-Hgd8CWNtqmssVukUXfdCHy1XJMxy2O7R0WZgTVcQVF4A3fjnWPQ1JPXf-"
+ "SIl-NLuC9gGzGRgsLyUyknjbUReNC7vcHx8jigGiO2CkKi_Mc_YRU0E0lGH3EQZiJNwHxUc_YkTGG5DKl9sww36TdMPz-v7Bzy6cHzR6r3yQWULGNtidaogAA");

final TokenResult tokenResult = strategy.requestToken(tokenRequest);
Assert.assertNull(tokenResult.getTokenResponse());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import android.content.Context
import androidx.test.core.app.ApplicationProvider
import com.microsoft.identity.client.PublicClientApplicationConfiguration
import com.microsoft.identity.client.PublicClientApplicationConfigurationFactory
import com.microsoft.identity.client.e2e.shadows.ShadowBrokerDiscoveryClient
import com.microsoft.identity.client.e2e.shadows.ShadowLegacyBrokerDiscoveryClient
import com.microsoft.identity.common.internal.controllers.BrokerMsalController
import com.microsoft.identity.common.java.authorities.Authority
Expand All @@ -38,7 +39,9 @@ import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config

@RunWith(RobolectricTestRunner::class)
@Config(shadows = [ShadowLegacyBrokerDiscoveryClient::class] )
@Config(shadows = [
ShadowLegacyBrokerDiscoveryClient::class,
ShadowBrokerDiscoveryClient::class] )
class MSALControllerFactoryTest {

private lateinit var pcaConfiguration: PublicClientApplicationConfiguration
Expand Down
2 changes: 1 addition & 1 deletion msal/versioning/version.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#Wed Aug 01 15:24:11 PDT 2018
versionName=5.2.0
versionName=5.3.0
versionCode=0
3 changes: 2 additions & 1 deletion msalautomationapp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

def msalVersion = "5.0.0"
def msalVersion = "5.+"

if (project.hasProperty("distMsalVersion")) {
msalVersion = distMsalVersion
Expand Down Expand Up @@ -191,6 +191,7 @@ dependencies {
implementation(project(":LabApiUtilities"))
implementation(project(":uiautomationutilities")) {
exclude module: 'common'
exclude module: 'common4j'
exclude module: 'appcompat'
}
androidTestImplementation "androidx.test:runner:$rootProject.ext.androidxTestRunnerVersion"
Expand Down
2 changes: 1 addition & 1 deletion testapps/testapp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

def msalVersion = "5.2.0"
def msalVersion = "5.+"

if (project.hasProperty("distMsalVersion")) {
msalVersion = distMsalVersion
Expand Down

0 comments on commit 033ed2c

Please sign in to comment.