40 lines
1.0 KiB
Swift
40 lines
1.0 KiB
Swift
//
|
|
// Copyright Amazon.com Inc. or its affiliates.
|
|
// All Rights Reserved.
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
import Amplify
|
|
import Foundation
|
|
|
|
struct CancelSignOut: Action {
|
|
|
|
var identifier: String = "CancelSignOut"
|
|
|
|
let signedInData: SignedInData?
|
|
|
|
func execute(withDispatcher dispatcher: EventDispatcher, environment: Environment) async {
|
|
logVerbose("\(#fileID) Starting execution", environment: environment)
|
|
let event = AuthenticationEvent(eventType: .cancelSignOut(signedInData))
|
|
logVerbose("\(#fileID) Sending event \(event.type)", environment: environment)
|
|
await dispatcher.send(event)
|
|
}
|
|
|
|
}
|
|
|
|
extension CancelSignOut: CustomDebugDictionaryConvertible {
|
|
var debugDictionary: [String: Any] {
|
|
[
|
|
"identifier": identifier,
|
|
"signedInData": signedInData?.debugDictionary ?? "NA"
|
|
]
|
|
}
|
|
}
|
|
|
|
extension CancelSignOut: CustomDebugStringConvertible {
|
|
var debugDescription: String {
|
|
debugDictionary.debugDescription
|
|
}
|
|
}
|