You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/cli/run.go
+35Lines changed: 35 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -121,6 +121,15 @@ type RunCMD struct {
121
121
AgentPoolCollectionDBPathstring`env:"LOCALAI_AGENT_POOL_COLLECTION_DB_PATH" help:"Database path for agent collections" group:"agents"`
122
122
AgentHubURLstring`env:"LOCALAI_AGENT_HUB_URL" default:"https://agenthub.localai.io" help:"URL for the agent hub where users can browse and download agent configurations" group:"agents"`
123
123
124
+
// Authentication
125
+
AuthEnabledbool`env:"LOCALAI_AUTH" default:"false" help:"Enable user authentication and authorization" group:"auth"`
126
+
AuthDatabaseURLstring`env:"LOCALAI_AUTH_DATABASE_URL,DATABASE_URL" help:"Database URL for auth (postgres:// or file path for SQLite). Defaults to {DataPath}/database.db" group:"auth"`
127
+
GitHubClientIDstring`env:"GITHUB_CLIENT_ID" help:"GitHub OAuth App Client ID (auto-enables auth when set)" group:"auth"`
// Auth is applied to _all_ endpoints. No exceptions. Filtering out endpoints to bypass is the role of the Skipper property of the KeyAuth Configuration
213
-
e.Use(keyAuthMiddleware)
211
+
// Initialize usage recording when auth DB is available
0 commit comments