getGuard method

  1. @override
Map<String, dynamic> getGuard(
  1. String guardName
)
override

Gets the guard configuration

guardName The guard name to retrieve Returns the guard configuration Throws AuthException if guard is not found

Implementation

@override
Map<String, dynamic> getGuard(String guardName) {
  final config = _getAuthConfig();
  final guards = config['guards'] as Map<String, dynamic>?;

  if (guards == null || !guards.containsKey(guardName)) {
    throw AuthException(
      'Authentication guard "$guardName" not found in configuration.',
    );
  }

  return guards[guardName] as Map<String, dynamic>;
}