User System Overview
The user system is built around theUserManager service and the User entity:
Jellyfin.Server.Implementations/Users/UserManager.cs
Users are cached in memory for fast access and synchronized with the database for persistence.
User Entity
TheUser entity contains all user-related data:
Jellyfin.Database.Implementations/Entities/User.cs
User Management Operations
Creating Users
Interface
Updating Users
Deleting Users
Authentication Providers
Jellyfin supports pluggable authentication providers:MediaBrowser.Controller/Authentication/IAuthenticationProvider.cs
Built-in Providers
- Default Provider
- Invalid Provider
- LDAP Plugin
The
DefaultAuthenticationProvider handles local password authentication:Custom authentication providers can be created by implementing
IAuthenticationProvider in a plugin.Authentication Flow
The authentication process follows these steps:1
User Credentials
Client submits username and password to
/Users/AuthenticateByName endpoint.2
User Lookup
UserManager retrieves the user by username:
3
Provider Selection
The appropriate authentication provider is selected based on the user’s
AuthenticationProviderId.4
Authentication
The provider validates the credentials:
5
Token Generation
A session token is generated and returned to the client for subsequent requests.
6
Session Tracking
The
SessionManager tracks the active session with device information and capabilities.User Policies
User policies control what users can access and do:MediaBrowser.Model/Users/UserPolicy.cs
Policy Examples
Password Management
Changing Passwords
Password Reset
Access Schedules
Access schedules restrict when users can access the server:Permissions
Fine-grained permissions control specific actions:Username Validation
Usernames must meet certain criteria:Security Features
- Login Attempts
- Session Management
- Password Complexity
Failed login attempts are tracked and can trigger account lockout:
Next Steps
Architecture
Learn about Jellyfin’s architecture
Media Libraries
Understand media organization
Plugins
Extend authentication with plugins
API Reference
User management API endpoints