Skip to content

Commit

Permalink
Merge pull request #34 from nevissecurity/feature/NEVISACCESSAPP-6297-…
Browse files Browse the repository at this point in the history
…Update-example-apps-to-use-SDK-3.8.1

NEVISACCESSAPP-6297: Update example apps to use SDK 3.8.1
  • Loading branch information
tamas-toth authored Nov 11, 2024
2 parents f49b378 + 14e419c commit ca9ee49
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 35 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -305,4 +305,4 @@ DEPENDENCIES
fastlane-plugin-firebase_app_distribution

BUNDLED WITH
2.5.22
2.5.23
8 changes: 5 additions & 3 deletions NevisExampleApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1250;
LastUpgradeCheck = 1540;
LastUpgradeCheck = 1610;
TargetAttributes = {
3833EB182685EA03002C5E0C = {
CreatedOnToolsVersion = 12.5;
Expand Down Expand Up @@ -956,6 +956,7 @@
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down Expand Up @@ -1018,6 +1019,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand Down Expand Up @@ -1055,7 +1057,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.7.0;
MARKETING_VERSION = 3.8.1;
PRODUCT_BUNDLE_IDENTIFIER = ch.nevis.mobile.authentication.sdk.ios.example;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand Down Expand Up @@ -1087,7 +1089,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.7.0;
MARKETING_VERSION = 3.8.1;
PRODUCT_BUNDLE_IDENTIFIER = ch.nevis.mobile.authentication.sdk.ios.example;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
LastUpgradeVersion = "1610"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 2 additions & 0 deletions NevisExampleApp/Configuration/Model/AppConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ struct AppConfiguration: Codable {
case deregistrationRequestPath
/// Key for the dispatch target resource path.
case dispatchTargetResourcePath
/// Key for the devices resource path.
case deviceResourcePath
/// Key for the authentication max retries.
case authenticationMaxRetries
/// Key for the authentication retry interval.
Expand Down
2 changes: 2 additions & 0 deletions NevisExampleApp/Resources/ConfigIdentitySuite.plist
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
<string>/nevisfido/uaf/1.1/request/deregistration/</string>
<key>dispatchTargetResourcePath</key>
<string>/nevisfido/token/dispatch/targets/</string>
<key>deviceResourcePath</key>
<string>/nevisfido/devices/</string>
<key>networkTimeoutInSeconds</key>
<integer>60</integer>
<key>authenticationMaxRetries</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ private extension SelectAccountPresenter {
}

let registeredAuthenticators = authenticators.filter {
$0.registration?.isRegistered(account.username) ?? false
$0.registration.isRegistered(account.username)
}

self.doDeregistration(for: account.username,
Expand Down
8 changes: 4 additions & 4 deletions NevisExampleApp/Utility/Validation/AccountValidator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ extension AccountValidator {
return .failure(AppError.authenticatorNotFound)
}

var accounts = [any Account]()
var accounts: [Username: any Account] = [:]
supportedAuthenticators.forEach { authenticator in
authenticator.registration?.registeredAccounts.forEach { account in
authenticator.registration.registeredAccounts.forEach { account in
if context.isPolicyCompliant(username: account.username, aaid: authenticator.aaid) {
accounts.append(account)
accounts[account.username] = account
}
}
}

return .success(accounts)
return .success(accounts.values.map { $0 })
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@ extension AuthenticatorValidator {
/// - Returns: The result of the validation
func validateForAuthentication(context: AuthenticatorSelectionContext, allowlistedAuthenticators: [AuthenticatorAaid]) -> ValidationResult<[any Authenticator]> {
let allowedAuthenticators = allowedAuthenticators(context: context, allowlistedAuthenticators: allowlistedAuthenticators).filter { authenticator in
guard let registration = authenticator.registration else { return false }

// Do not display:
// - policy non-registered authenticators,
// - not hardware supported authenticators.
return authenticator.isSupportedByHardware && registration.isRegistered(context.account.username)
authenticator.isSupportedByHardware && authenticator.registration.isRegistered(context.account.username)
}

if allowedAuthenticators.isEmpty {
Expand Down
10 changes: 5 additions & 5 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ IOSDeploymentTarget = '12.0'
target 'NevisExampleApp' do
platform :ios, IOSDeploymentTarget

pod 'FittedSheets', '= 2.6.1'
pod 'FittedSheets', '= 2.7.1'
pod 'KRProgressHUD', '= 3.4.8'
pod 'MercariQRScanner', '= 1.9.0'
pod 'Swinject', '= 2.8.3'
pod 'SwinjectAutoregistration', '= 2.8.3'
pod 'Swinject', '= 2.9.1'
pod 'SwinjectAutoregistration', '= 2.9.1'
pod 'Then', '= 3.0.0'
pod 'NevisMobileAuthentication', '3.7.3', :configurations => ['Release']
pod 'NevisMobileAuthentication-Debug', '3.7.3', :configurations => ['Debug']
pod 'NevisMobileAuthentication', '3.8.1', :configurations => ['Release']
pod 'NevisMobileAuthentication-Debug', '3.8.1', :configurations => ['Debug']
end

post_install do |installer|
Expand Down
34 changes: 17 additions & 17 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
PODS:
- FittedSheets (2.6.1)
- FittedSheets (2.7.1)
- KRActivityIndicatorView (3.0.8)
- KRProgressHUD (3.4.8):
- KRActivityIndicatorView (= 3.0.8)
- MercariQRScanner (1.9.0)
- NevisMobileAuthentication (3.7.3)
- NevisMobileAuthentication-Debug (3.7.3)
- Swinject (2.8.3)
- SwinjectAutoregistration (2.8.3):
- Swinject (~> 2.8.3)
- NevisMobileAuthentication (3.8.1)
- NevisMobileAuthentication-Debug (3.8.1)
- Swinject (2.9.1)
- SwinjectAutoregistration (2.9.1):
- Swinject (~> 2.9.1)
- Then (3.0.0)

DEPENDENCIES:
- FittedSheets (= 2.6.1)
- FittedSheets (= 2.7.1)
- KRProgressHUD (= 3.4.8)
- MercariQRScanner (= 1.9.0)
- NevisMobileAuthentication (= 3.7.3)
- NevisMobileAuthentication-Debug (= 3.7.3)
- Swinject (= 2.8.3)
- SwinjectAutoregistration (= 2.8.3)
- NevisMobileAuthentication (= 3.8.1)
- NevisMobileAuthentication-Debug (= 3.8.1)
- Swinject (= 2.9.1)
- SwinjectAutoregistration (= 2.9.1)
- Then (= 3.0.0)

SPEC REPOS:
Expand All @@ -34,16 +34,16 @@ SPEC REPOS:
- Then

SPEC CHECKSUMS:
FittedSheets: 37e35f105c531f3845075f1788dd8517a35315c4
FittedSheets: 38ec85129bf5c970f99d4dba4fbf48185c5fa98a
KRActivityIndicatorView: c5c503bf56e54834382dd926b64ff47287ca0006
KRProgressHUD: d0fb4e72428d312eb6966e84c543ea58fb1efbc7
MercariQRScanner: e5aea873969af59b09b4cc411fc1c5b6293dba44
NevisMobileAuthentication: 2acb327b1ec23d0d5cd17ff05392cad6405cf070
NevisMobileAuthentication-Debug: b8e3141e0e926a93488c7d92d7658b8ed388a2b7
Swinject: 893c9a543000ac2f10ee4cbaf0933c6992c935d5
SwinjectAutoregistration: e3ee378dc458acf78d176fc7fec3902603452667
NevisMobileAuthentication: c42744e752332068c6f7f2828dbbd713ebc18f14
NevisMobileAuthentication-Debug: 148684612cd8c5a40f782831aa36a98dc8230e90
Swinject: a827d508c6270da03ec74e558e728917a888fa9b
SwinjectAutoregistration: a14d8ed61e88b0044a292958d63318b378375ca6
Then: 844265ae87834bbe1147d91d5d41a404da2ec27d

PODFILE CHECKSUM: 11aba951730638eee898effcb9a85f540ce5d708
PODFILE CHECKSUM: 81cf7bc3e4de16cd9976dafa133216c7567c8447

COCOAPODS: 1.16.2

0 comments on commit ca9ee49

Please sign in to comment.