//
// Copyright © 2023 Nevis Security AG. All rights reserved.
//

import NevisMobileAuthentication

struct CancelMethodHandler: MethodHandler {
	func execute(using _: MobileAuthenticationClient, with message: ChannelInMessage) {
		let message: CancelMessage = validate(message: message)
		OperationCache.shared.cancel(by: message.operationId)
		MethodChannelHandler.shared.resolve(method: .cancel)
	}
}
