17 lines
566 B
Dart
17 lines
566 B
Dart
import '../../config/app_config.dart';
|
|
import '../interfaces/auth_service.dart';
|
|
import '../api/api_client.dart';
|
|
|
|
class MockAuthService implements AuthService {
|
|
@override
|
|
Future<String> login(String username, String secret) async {
|
|
await Future.delayed(const Duration(milliseconds: 600));
|
|
|
|
if (username == AppConfig.mockAdminUsername &&
|
|
secret == AppConfig.mockAdminSecret) {
|
|
return 'mock_jwt_token_for_debug_mode';
|
|
}
|
|
throw const ApiException(statusCode: 401, message: 'نام کاربری یا رمز اشتباه است');
|
|
}
|
|
}
|