-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Auth) Keychain Sharing (App Reload Required)
* Remove migrateKeychainItemsOfUserSession bool from SecureStoragePreferences
- Loading branch information
1 parent
81a4864
commit 09f0583
Showing
19 changed files
with
794 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// Copyright Amazon.com Inc. or its affiliates. | ||
// All Rights Reserved. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
import Foundation | ||
|
||
public struct AccessGroup { | ||
public let name: String? | ||
public let migrateKeychainItems: Bool | ||
|
||
public init(name: String, migrateKeychainItemsOfUserSession: Bool = false) { | ||
self.init(name: name, migrateKeychainItems: migrateKeychainItemsOfUserSession) | ||
} | ||
|
||
public static func none(migrateKeychainItemsOfUserSession: Bool) -> AccessGroup { | ||
return .init(name: nil, migrateKeychainItems: migrateKeychainItemsOfUserSession) | ||
} | ||
|
||
public static var none: AccessGroup { | ||
return .none(migrateKeychainItemsOfUserSession: false) | ||
} | ||
|
||
private init(name: String?, migrateKeychainItems: Bool) { | ||
self.name = name | ||
self.migrateKeychainItems = migrateKeychainItems | ||
} | ||
} |
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
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
19 changes: 19 additions & 0 deletions
19
...Plugins/Auth/Sources/AWSCognitoAuthPlugin/Models/AWSCognitoSecureStoragePreferences.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,19 @@ | ||
// | ||
// Copyright Amazon.com Inc. or its affiliates. | ||
// All Rights Reserved. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
import Foundation | ||
import Amplify | ||
|
||
public struct AWSCognitoSecureStoragePreferences { | ||
|
||
/// The access group that the keychain will use for auth items | ||
public let accessGroup: AccessGroup? | ||
|
||
public init(accessGroup: AccessGroup? = nil) { | ||
self.accessGroup = accessGroup | ||
} | ||
} |
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
Oops, something went wrong.