// // Copyright Amazon.com Inc. or its affiliates. // All Rights Reserved. // // SPDX-License-Identifier: Apache-2.0 // import Foundation struct ConfigureAuthorization: Action { let identifier = "ConfigureAuthorization" func execute(withDispatcher dispatcher: EventDispatcher, environment: Environment) async { logVerbose("\(#fileID) Starting execution", environment: environment) // Send Authorization configured event to move the Auth state to configured let event = AuthEvent(eventType: .authorizationConfigured) logVerbose("\(#fileID) Sending event \(event.type)", environment: environment) await dispatcher.send(event) } } extension ConfigureAuthorization: CustomDebugDictionaryConvertible { var debugDictionary: [String: Any] { [ "identifier": identifier ] } } extension ConfigureAuthorization: CustomDebugStringConvertible { var debugDescription: String { debugDictionary.debugDescription } }