-
Notifications
You must be signed in to change notification settings - Fork 26
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
SDKS-2995_Device_Binding_Block_Simulator #260
Merged
vahancouver
merged 7 commits into
develop
from
SDKS-2995_Device_Binding_Block_Simulator
Feb 27, 2024
Merged
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5fa1203
Checking if the DeviceBinding/Signing callback is triggered in a simu…
george-bafaloukas-forgerock 9258c05
Setting the outcome to be unsupported.
george-bafaloukas-forgerock 8afbafd
Commenting out binding tests for Simulators as the feature is not sup…
george-bafaloukas-forgerock 735bb3f
Updated copywriting
george-bafaloukas-forgerock 399d774
Skip unsupported tests on simulator
vahancouver 9fae2ee
Update Device binding tests to cover simulator unsupported cases
vahancouver 2940b3c
Fix failing tests
vahancouver File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -148,7 +148,6 @@ open class DeviceBindingCallback: MultipleValuesCallback, Binding { | |
/// - Parameter completion: Completion block for Device binding result callback | ||
open func bind(deviceAuthenticator: ((DeviceBindingAuthenticationType) -> DeviceAuthenticator)? = nil, | ||
completion: @escaping DeviceBindingResultCallback) { | ||
|
||
let authInterface = deviceAuthenticator?(deviceBindingAuthenticationType) ?? deviceAuthenticatorIdentifier(deviceBindingAuthenticationType) | ||
|
||
let dispatchQueue = DispatchQueue(label: "com.forgerock.serialQueue", qos: .userInitiated) | ||
|
@@ -167,7 +166,11 @@ open class DeviceBindingCallback: MultipleValuesCallback, Binding { | |
deviceId: String? = nil, | ||
deviceRepository: DeviceBindingRepository = LocalDeviceBindingRepository(), | ||
_ completion: @escaping DeviceBindingResultCallback) { | ||
|
||
#if targetEnvironment(simulator) | ||
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. Update copyright |
||
// DeviceBinding/Signing is not supported on the iOS Simulator | ||
handleException(status: .unsupported(errorMessage: "DeviceBinding/Signing is not supported on the iOS Simulator"), completion: completion) | ||
return | ||
#endif | ||
let authInterface = authInterface ?? getDeviceAuthenticator(type: deviceBindingAuthenticationType) | ||
authInterface.initialize(userId: userId, prompt: Prompt(title: title, subtitle: subtitle, description: promptDescription)) | ||
let deviceId = deviceId ?? FRDevice.currentDevice?.identifier.getIdentifier() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -174,7 +174,11 @@ open class DeviceSigningVerifierCallback: MultipleValuesCallback, Binding { | |
authInterface: DeviceAuthenticator, | ||
customClaims: [String: Any] = [:], | ||
_ completion: @escaping DeviceSigningResultCallback) { | ||
|
||
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. Update copyright |
||
#if targetEnvironment(simulator) | ||
// DeviceBinding/Signing is not supported on the iOS Simulator | ||
handleException(status: .unsupported(errorMessage: "DeviceBinding/Signing is not supported on the iOS Simulator"), completion: completion) | ||
return | ||
#endif | ||
authInterface.initialize(userId: userKey.userId, prompt: Prompt(title: title, subtitle: subtitle, description: promptDescription)) | ||
guard authInterface.isSupported() else { | ||
handleException(status: .unsupported(errorMessage: nil), completion: completion) | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Update copyright