-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(auth): Update public API request and options parameters
- Loading branch information
1 parent
4d940a6
commit 99256c1
Showing
9 changed files
with
93 additions
and
15 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
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
34 changes: 34 additions & 0 deletions
34
Amplify/Categories/Auth/Request/AuthPasswordlessRequest.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,34 @@ | ||
// | ||
// Copyright Amazon.com Inc. or its affiliates. | ||
// All Rights Reserved. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
import Foundation | ||
|
||
/// Request to sign in a user with Magic Link | ||
public struct AuthPasswordlessRequest: AmplifyOperationRequest { | ||
|
||
/// Extra request options defined in `AuthPasswordlessRequest.Options` | ||
public var options: Options | ||
|
||
public init(options: Options) { | ||
self.options = options | ||
} | ||
} | ||
|
||
public extension AuthPasswordlessRequest { | ||
|
||
struct Options { | ||
|
||
/// Extra plugin specific options, only used in special circumstances when the existing options do not provide | ||
/// a way to utilize the underlying auth plugin functionality. See plugin documentation for expected | ||
/// key/values | ||
public let pluginOptions: Any? | ||
|
||
public init(pluginOptions: Any? = nil) { | ||
self.pluginOptions = pluginOptions | ||
} | ||
} | ||
} |
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
17 changes: 17 additions & 0 deletions
17
...s/Auth/Sources/AWSCognitoAuthPlugin/Models/Options/AWSAuthSignInPasswordlessOptions.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,17 @@ | ||
// | ||
// Copyright Amazon.com Inc. or its affiliates. | ||
// All Rights Reserved. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
import Foundation | ||
|
||
public struct AWSAuthSignInPasswordlessOptions { | ||
|
||
public let clientMetadata: [String: String]? | ||
|
||
public init(clientMetadata: [String: String]? = nil) { | ||
self.clientMetadata = clientMetadata | ||
} | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
...urces/AWSCognitoAuthPlugin/Models/Options/AWSAuthSignUpAndSignInPasswordlessOptions.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,20 @@ | ||
// | ||
// Copyright Amazon.com Inc. or its affiliates. | ||
// All Rights Reserved. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
import Foundation | ||
|
||
public struct AWSAuthSignUpAndSignInPasswordlessOptions { | ||
|
||
public let userAttributes: [String: String]? | ||
public let clientMetadata: [String: String]? | ||
|
||
public init(userAttributes: [String: String]? = nil, | ||
clientMetadata: [String: String]? = nil) { | ||
self.userAttributes = userAttributes | ||
self.clientMetadata = clientMetadata | ||
} | ||
|
||
} |
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