zendframework/zend-authentication
Zend\Authentication provides a flexible authentication API with adapters for common scenarios. This repository was abandoned on 2019-12-31 and has moved to laminas/laminas-authentication. Documentation: docs.zendframework.com/zend-authentication.
Auth system or Symfony’s Security component.composer require zendframework/zend-authentication:^2.7.0), then configure adapters (e.g., DbTable, Ldap, OAuth2) in config/autoload/auth.local.php (ZF style) or service manager.Zend\Authentication\Adapter\DbTable. Example: create a class implementing AdapterInterface, call $authentication->authenticate($adapter).Authorization header cannot be base64 decoded (PR #42).AdapterInterface and returning Result objects with status, identity, and messages.Zend\Authentication\Storage (e.g., Session) to persist identity post-authentication — inject into service layer for manual authentication ($auth->authenticate() → $auth->getStorage()->write($result->getIdentity())).zendframework/ with laminas/ namespaces (laminas/laminas-authentication). Service configuration moves to config/services.php or Module::getServiceConfig().AuthService) using ServiceFactory, injecting storage + adapter — avoid direct calls to Zend\Authentication\AuthenticationService in controllers.Zend\Authentication\Validator\Authentication configuration option to map custom authentication result codes to validation messages (PR #47). Example:
$validator = new AuthenticationValidator([
'customCodes' => [
'invalid_credentials' => 'Invalid username or password.',
'account_locked' => 'Your account is temporarily locked.',
],
]);
laravel/ui, laravel/breeze, or Symfony’s security stack.Zend\* classes are migrated to Laminas\*. Replace use Zend\Authentication\... → use Laminas\Authentication\....Zend\Authentication\Storage\Session uses its own session handler — ensure compatible session start and namespace isolation to avoid collisions.getResult()->isValid(), and review getMessages() for user-facing feedback — failed authentications return opaque errors without explicit logging.DbTable adapter for multi-tenant auth (e.g., dynamic table names) or add custom credentials hashing by wrapping the adapter in a decorator that pre-processes credentials.composer.json enforces PHP 7.3+ compatibility. Older versions are no longer supported (removed zend-stdlib v2 compatibility in PR #44).401 Unauthorized responses with a WWW-Authenticate: Basic header and retry with valid credentials.How can I help you explore Laravel packages today?