Files
Gas-Tank-AR-App/GasTankAR/Services/AuthenticationService.swift

23 lines
548 B
Swift

import Foundation
/// Domain boundary; the concrete server integration will replace the stub.
protocol AuthenticationService: Sendable {
func signIn(salesCode: String) async throws -> LoginSession
}
struct LoginSession: Equatable, Sendable {
let salesCode: String
let displayName: String?
init(salesCode: String, displayName: String? = nil) {
self.salesCode = salesCode
self.displayName = displayName
}
}
enum LoginError: Error, Equatable {
case invalidSalesCode
case rejected
case unavailable
}