An Elixir authentication library for Plug and Phoenix applications that provides a simple API with flexible underlying modules.
Doorman is an authentication library for Elixir's Plug and Phoenix frameworks that simplifies user authentication with Ecto. It provides an opinionated, easy-to-use interface for session-based authentication while maintaining flexibility through modular design. The library helps developers avoid excessive configuration and rigid frameworks when implementing authentication in their Elixir applications.
Elixir developers building web applications with Phoenix and Ecto who need a straightforward authentication solution. Specifically, developers who want session-based authentication without the complexity of larger authentication frameworks.
Developers choose Doorman because it balances simplicity with flexibility—offering an opinionated high-level API while allowing direct use of core modules for custom authentication flows. Unlike rigid frameworks, Doorman provides essential authentication features (session management, password hashing, credential validation) without forcing developers into specific patterns.
Tools to make Plug, and Phoenix authentication simple and flexible.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The `Doorman.Login.Session` plug can be added to Phoenix pipelines, providing immediate access to `current_user` in connection assigns with minimal configuration, as shown in the README's quick start.
Includes `Doorman.Auth.Bcrypt` for password hashing and verification, ensuring secure storage without external dependencies, evidenced by its integration in user model changesets.
Core modules like `Doorman.authenticate/2` and `Doorman.logged_in?/1` can be used directly, allowing developers to build custom authentication flows while leveraging the high-level API for common tasks.
Provides `Secret.put_session_secret/1` for managing secure session tokens during user creation or renewal, enhancing security without complex manual handling.
Lacks built-in OAuth or social login providers, requiring additional libraries or custom implementation for modern authentication methods, which the README does not address.
Requires explicit configuration of the user model with fields like `hashed_password` and `session_secret`, adding initial complexity and potential for errors, as detailed in the installation steps.
Primarily focused on session-based authentication, making it unsuitable for token-based or API-centric applications without significant extension, a gap not covered in features.