Skip to content

Commit 4cd6143

Browse files
authored
Merge pull request #424 from AzureAD/release/0.2.1_msal-420
Prepares 0.2.1
2 parents 162c715 + 94c9463 commit 4cd6143

File tree

7 files changed

+32
-13
lines changed

7 files changed

+32
-13
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@ Add to your app's Build.Gradle:
4343
mavenCentral()
4444
}
4545
dependencies {
46-
compile('com.microsoft.identity.client:msal:0.1.3') {
46+
compile('com.microsoft.identity.client:msal:0.2.1') {
4747
// if your app includes android support
48-
// libraries or GSON in its dependencies
48+
// libraries, nimbus-jose, or GSON in its dependencies
4949
// uncomment below
5050
51+
// exclude group: 'com.nimbusds', module: 'nimbus-jose-jwt'
5152
// exclude group: 'com.android.support', module: 'appcompat-v7'
5253
// exclude group: 'com.google.code.gson'
5354
}
@@ -90,7 +91,6 @@ Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MI
9091

9192
### Requirements
9293
* Android SDK 21+
93-
* [Chrome](https://github.com/Azure-Samples/active-directory-general-docs/blob/master/AndroidEmulator.md)
9494

9595
### Step 1: Configure the AndroidManifest.xml
9696

changelog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
MSAL Wiki : https://github.com/AzureAD/microsoft-authentication-library-for-android/wiki
22

3+
Version 0.2.1
4+
----------------------------
5+
6+
* Bugfix: Resolves MSAL/#420
7+
- Corrects an issue whereby expired access tokens can be returned from the cache
8+
* Bugfix: Resolves MSAL/#418
9+
- Adds client_id, redirect_uri to refresh token requests (previously missing, yielding inconsistent behavior depending on account type).
10+
311
Version 0.2.0
412
----------------------------
513
- Cache schema has been redesigned to support migration from ADAL 1.15.2+

common

Submodule common updated 23 files

msal/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ dependencies {
125125
transitive = false
126126
}
127127

128-
snapshotApi(group: 'com.microsoft.identity', name: 'common', version: '0.0.5', changing: true)
128+
snapshotApi(group: 'com.microsoft.identity', name: 'common', version: '0.0.7', changing: true)
129129

130-
distApi("com.microsoft.identity:common:0.0.5") {
130+
distApi("com.microsoft.identity:common:0.0.7") {
131131
transitive = false
132132
}
133133
}

msal/src/main/java/com/microsoft/identity/client/PublicClientApplication.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,7 @@ private MSALAcquireTokenSilentOperationParameters getSilentOperationParameters(f
841841
parameters.setClientId(mClientId);
842842
parameters.setTokenCache(mOauth2TokenCache);
843843
parameters.setAuthority(Authority.getAuthorityFromAuthorityUrl(authorityStr));
844+
parameters.setRedirectUri(mRedirectUri);
844845
if (null != account) {
845846
parameters.setAccount(
846847
getAccountInternal(

msal/src/main/java/com/microsoft/identity/client/internal/controllers/LocalMSALController.java

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import com.microsoft.identity.client.exception.MsalClientException;
3535
import com.microsoft.identity.client.exception.MsalUiRequiredException;
3636
import com.microsoft.identity.client.internal.authorities.Authority;
37+
import com.microsoft.identity.common.adal.internal.util.StringExtensions;
3738
import com.microsoft.identity.common.exception.ClientException;
3839
import com.microsoft.identity.common.internal.cache.ICacheRecord;
3940
import com.microsoft.identity.common.internal.dto.AccountRecord;
@@ -424,11 +425,20 @@ private TokenResult performSilentTokenRequest(final OAuth2Strategy strategy,
424425
"Requesting tokens..."
425426
);
426427
throwIfNetworkNotAvailable(parameters.getAppContext());
427-
return strategy.requestToken(
428-
strategy.createRefreshTokenRequest(
429-
parameters.getRefreshToken(),
430-
parameters.getScopes()
431-
)
432-
);
428+
429+
final TokenRequest refreshTokenRequest = strategy.createRefreshTokenRequest();
430+
refreshTokenRequest.setClientId(parameters.getClientId());
431+
refreshTokenRequest.setScope(StringUtil.join(' ', parameters.getScopes()));
432+
refreshTokenRequest.setRefreshToken(parameters.getRefreshToken().getSecret());
433+
refreshTokenRequest.setRedirectUri(parameters.getRedirectUri());
434+
435+
if (!StringExtensions.isNullOrBlank(refreshTokenRequest.getScope())) {
436+
Logger.verbosePII(
437+
TAG + methodName,
438+
"Scopes: [" + refreshTokenRequest.getScope() + "]"
439+
);
440+
}
441+
442+
return strategy.requestToken(refreshTokenRequest);
433443
}
434444
}

msal/versioning/version.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#Wed Aug 01 15:24:11 PDT 2018
2-
versionName=0.2.0
2+
versionName=0.2.1
33
versionCode=0

0 commit comments

Comments
 (0)