-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Adding enter TOTP code view (#39) * feat: Adding enter TOTP code view * making doc changes * feat: Add MFA selection view (#40) * feat: Add MFA selection view * worked on review comments * feat: Adding TOTP Setup view during sign in (#41) * feat: Adding TOTP Setup view during sign in * removed init and added view modifier for issuer * worked on review comments and refactored bunch of things to log stuff * feat: add UI testing module for Authenticator (#42) * feat: add login for testing snaphshots * updated the image diff logic * refactored process argument logic * renamed and regrouped files * adding new test case * adding enter totp view tests * renaming the utils file * updated entitlements that are not needed * adding mfa selection test * adding totp setup tests * updates tolerance and image * restructuring and renaming * removing the hardcoded test key * clean up * feat: Refactored based on TOTP API review (#45) * feat: Converting to a dedicated MFA Selection state * feat: converting to a dedicated setup totp state and refactoring options * chore: increasing the tolerance to 1 percent for snapshot testing * worked on review commetns * trying out deducing step information when creating a view * worked on API review changes * added unit tests * worked on review comments.. * worked on review comments. * feat: modifying based on API review feedback (#46) * worked on review comments. * fixing macOS build error
- Loading branch information
Showing
58 changed files
with
3,005 additions
and
30 deletions.
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// Copyright Amazon.com Inc. or its affiliates. | ||
// All Rights Reserved. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
import Foundation | ||
|
||
extension Bundle { | ||
|
||
var applicationName: String? { | ||
if let localizedName = Bundle.main.infoDictionary?[kCFBundleLocalizationsKey as String] as? String { | ||
return localizedName | ||
} | ||
if let displayName = Bundle.main.infoDictionary?["CFBundleDisplayName"] as? String { | ||
return displayName | ||
} | ||
if let bundleName = Bundle.main.infoDictionary?[kCFBundleNameKey as String] as? String { | ||
return bundleName | ||
} | ||
return nil | ||
} | ||
} |
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
12 changes: 12 additions & 0 deletions
12
Sources/Authenticator/Models/Internal/AuthenticatorMFAType.swift
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// | ||
// Copyright Amazon.com Inc. or its affiliates. | ||
// All Rights Reserved. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
enum AuthenticatorMFAType { | ||
case sms | ||
case totp | ||
case none | ||
} |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// Copyright Amazon.com Inc. or its affiliates. | ||
// All Rights Reserved. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
import Foundation | ||
|
||
/// Options for configuring the TOTP MFA Experience | ||
public struct TOTPOptions { | ||
|
||
/// The `issuer` is the title displayed in a user's TOTP App preceding the | ||
/// account name. In most cases, this should be the name of your app. | ||
/// For example, if your app is called "My App", your user will see | ||
/// "My App" - "username" in their TOTP app. | ||
public let issuer: String? | ||
|
||
/// Creates a `TOTPOptions` | ||
/// - Parameter issuer: The `issuer` is the title displayed in a user's TOTP App | ||
public init(issuer: String? = nil) { | ||
self.issuer = issuer | ||
} | ||
} |
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
Oops, something went wrong.