Skip to content
Draft
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions IdentityCore/IdentityCore.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions IdentityCore/src/MSIDError.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ typedef NS_ENUM(NSInteger, MSIDErrorCode)

// Workplacejoin device upgrade registration required for device.
MSIDErrorInsufficientDeviceStrength = -51732,

MSIDErrorMDMEnrollmentCompletedNeedsRetry = -51733,

/*!
=========================================================
Broker flow errors (518xx and 519xx) - MSIDErrorDomain
Expand Down
2 changes: 2 additions & 0 deletions IdentityCore/src/MSIDError.m
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ void MSIDFillAndLogError(NSError **error, MSIDErrorCode errorCode, NSString *err
return @"MSIDErrorUINotSupportedInExtension";
case MSIDErrorInsufficientDeviceStrength:
return @"MSIDErrorInsufficientDeviceStrength";
case MSIDErrorMDMEnrollmentCompletedNeedsRetry:
return @"MSIDErrorMDMEnrollmentCompletedNeedsRetry";
// Broker flow errors
case MSIDErrorBrokerResponseNotReceived:
return @"MSIDErrorBrokerResponseNotReceived";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,19 @@ - (MSIDWebviewResponse *)responseWithResultURL:(NSURL *)url
error:error];
}

- (MSIDWebviewResponse *)responseWithResultURL:(NSURL *)url
factory:(MSIDWebviewFactory *)factory
responseHeaders:(NSDictionary<NSString *, NSString *> *)lastResponseHeaders
context:(id<MSIDRequestContext>)context
error:(NSError *__autoreleasing*)error
{
return [factory oAuthResponseWithURL:url
requestState:self.state
ignoreInvalidState:self.ignoreInvalidState
endRedirectUri:self.endRedirectUrl
responseHeaders:lastResponseHeaders
context:context
error:error];
}

@end
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ NS_ASSUME_NONNULL_BEGIN
context:(nullable id<MSIDRequestContext>)context
error:(NSError * _Nullable __autoreleasing * _Nullable)error;

- (nullable MSIDWebviewResponse *)responseWithResultURL:(NSURL *)url
factory:(MSIDWebviewFactory *)factory
responseHeaders:(NSDictionary<NSString *, NSString *> *)lastResponseHeaders
context:(nullable id<MSIDRequestContext>)context
error:(NSError * _Nullable __autoreleasing * _Nullable)error;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,14 @@ - (MSIDWebviewResponse *)responseWithResultURL:(__unused NSURL *)url
return nil;
}

- (MSIDWebviewResponse *)responseWithResultURL:(NSURL *)url
factory:(MSIDWebviewFactory *)factory
responseHeaders:(NSDictionary<NSString *, NSString *> *)lastResponseHeaders
context:(id<MSIDRequestContext>)context
error:(NSError *__autoreleasing*)error
{
// Default implementation ignores responseHeaders parameter for backward compatibility
return [self responseWithResultURL:url factory:factory context:context error:error];
}

@end
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,35 @@

#import "MSIDLocalInteractiveController.h"

@class MSIDWebMDMInstallProfileResponse;
@class MSIDWebMDMEnrollmentCompletionResponse;

NS_ASSUME_NONNULL_BEGIN

@interface MSIDLocalInteractiveController ()

/*!
Whether BRT acquisition has been attempted in this session.
BRT acquisition logic (simplified):
- Acquired on FIRST msauth:// or browser:// redirect if needed
- Only ONE attempt per session (no retry)

Check before acquisition: !brtAcquired && !brtAttemptAttempted
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment has a typo: "Attemptted" should be "Attempted" (double 't' should be single 't').

Suggested change
Check before acquisition: !brtAcquired && !brtAttemptAttempted
Check before acquisition: !brtAcquired && !brtAttempted

Copilot uses AI. Check for mistakes.
*/
@property (nonatomic, assign) BOOL brtAttempted;

/*! Whether BRT was successfully acquired in this session */
@property (nonatomic, assign) BOOL brtAcquired;

- (void)acquireTokenWithRequest:(MSIDInteractiveTokenRequest *)request
completionBlock:(MSIDRequestCompletionBlock)completionBlock;

//- (void)handleWebMDMInstallProfileResponse:(MSIDWebMDMInstallProfileResponse *)mdmInstallProfileResponse
// completion:(MSIDRequestCompletionBlock)completionBlock;
//
//- (void)handleWebMDMEnrollmentCompletionResponse:(MSIDWebMDMEnrollmentCompletionResponse *)mdmEnrollmentCompletionResponse
// completion:(MSIDRequestCompletionBlock)completionBlock;
Comment on lines +49 to +53
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented-out code should be removed before merging. Lines 49-53 contain commented-out method declarations that add clutter and confusion. If these methods need to be tracked for future implementation, create a TODO comment or track in an issue instead.

Suggested change
//- (void)handleWebMDMInstallProfileResponse:(MSIDWebMDMInstallProfileResponse *)mdmInstallProfileResponse
// completion:(MSIDRequestCompletionBlock)completionBlock;
//
//- (void)handleWebMDMEnrollmentCompletionResponse:(MSIDWebMDMEnrollmentCompletionResponse *)mdmEnrollmentCompletionResponse
// completion:(MSIDRequestCompletionBlock)completionBlock;
// TODO: Add internal MDM web response handling methods here if/when MDM flows are implemented.

Copilot uses AI. Check for mistakes.

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
#import "MSIDBaseRequestController.h"
#import "MSIDTokenRequestProviding.h"
#import "MSIDRequestControlling.h"
#import "MSIDWebviewSpecialNavigationDelegate.h"

@class MSIDInteractiveTokenRequestParameters;
@class MSIDWebWPJResponse;

@interface MSIDLocalInteractiveController : MSIDBaseRequestController <MSIDRequestControlling>

@interface MSIDLocalInteractiveController : MSIDBaseRequestController <MSIDRequestControlling, MSIDWebviewSpecialNavigationDelegate>

@property (nonatomic, readonly, nullable) MSIDInteractiveTokenRequestParameters *interactiveRequestParamaters;

Expand Down
Loading
Loading