Skip to content

Commit d871dea

Browse files
authored
Merge pull request #2339 from AzureAD/oldalton/extra_query_params_signout
Support extra query parameters in logout endpoint
2 parents f40aff4 + 0fcd3cc commit d871dea

File tree

9 files changed

+19
-5
lines changed

9 files changed

+19
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
## [TBD]:
2+
* Support extra query parameters on logout endpoint (#2339)
3+
4+
## [1.5.1]:
25
* Parse and add STS error codes in token error result (#2319)
36
* VisionOS support added (#2139)
47

MSAL.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "MSAL"
3-
s.version = "1.5.0"
3+
s.version = "1.5.1"
44
s.summary = "Microsoft Authentication Library (MSAL) for iOS"
55
s.description = <<-DESC
66
The MSAL library for iOS gives your app the ability to begin using the Microsoft Cloud by supporting Microsoft Azure Active Directory and Microsoft Accounts in a converged experience using industry standard OAuth2 and OpenID Connect. The library also supports Microsoft Azure B2C for those using our hosted identity management service.

MSAL/resources/ios/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.5.0</string>
18+
<string>1.5.1</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSPrincipalClass</key>

MSAL/resources/mac/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.5.0</string>
18+
<string>1.5.1</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSHumanReadableCopyright</key>

MSAL/src/MSALPublicClientApplication.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,6 +1458,10 @@ - (void)signoutWithAccount:(nonnull MSALAccount *)account
14581458
msidParams.platformSequence = [NSString msidUpdatePlatformSequenceParamWithSrcName:[MSIDVersion platformName]
14591459
srcVersion:[MSIDVersion sdkVersion]
14601460
sequence:nil];
1461+
1462+
// Extra parameters to be added to the /authorize endpoint.
1463+
msidParams.extraURLQueryParameters = signoutParameters.extraQueryParameters;
1464+
14611465
NSError *localError;
14621466
BOOL localRemovalResult = [self removeAccountImpl:account wipeAccount:signoutParameters.wipeAccount error:&localError];
14631467

MSAL/src/MSAL_Internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#define MSAL_VER_HIGH 1
2929
#define MSAL_VER_LOW 5
30-
#define MSAL_VER_PATCH 0
30+
#define MSAL_VER_PATCH 1
3131

3232
#define STR_HELPER(x) #x
3333
#define STR(x) STR_HELPER(x)

MSAL/src/public/MSALSignoutParameters.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ NS_ASSUME_NONNULL_BEGIN
6868
*/
6969
@property (nonatomic) BOOL wipeCacheForAllAccounts;
7070

71+
/**
72+
Key-value pairs to pass to the logout endpoint. This should not be url-encoded value.
73+
*/
74+
@property (nonatomic, nullable) NSDictionary <NSString *, NSString *> *extraQueryParameters;
75+
7176
/**
7277
Initialize MSALSignoutParameters with web parameters.
7378

MSAL/test/unit/MSALPublicClientApplicationTests.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3565,6 +3565,7 @@ - (void)testSignoutWithAccount_whenNonNilAccount_andSignoutFromBrowserTrue_andBr
35653565
MSALWebviewParameters *webParams = [[MSALWebviewParameters alloc] initWithAuthPresentationViewController:[self.class sharedViewControllerStub]];
35663566
MSALSignoutParameters *parameters = [[MSALSignoutParameters alloc] initWithWebviewParameters:webParams];
35673567
parameters.signoutFromBrowser = YES;
3568+
parameters.extraQueryParameters = @{@"key1": @"value1"};
35683569
MSALGlobalConfig.brokerAvailability = MSALBrokeredAvailabilityNone;
35693570

35703571
XCTAssertEqual([application allAccounts:nil].count, 1);
@@ -3581,6 +3582,7 @@ - (void)testSignoutWithAccount_whenNonNilAccount_andSignoutFromBrowserTrue_andBr
35813582

35823583
XCTAssertEqualObjects(params.accountIdentifier.displayableId, @"[email protected]");
35833584
XCTAssertEqualObjects(params.accountIdentifier.homeAccountId, @"myuid.utid");
3585+
XCTAssertEqualObjects(params.extraURLQueryParameters[@"key1"], @"value1");
35843586

35853587
XCTAssertEqualObjects(params.authority.url.absoluteString, @"https://login.microsoftonline.com/common");
35863588
XCTAssertEqualObjects(params.clientId, UNIT_TEST_CLIENT_ID);

0 commit comments

Comments
 (0)