Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OIDC Gateway

A lightweight, zero-dependency OIDC identity gateway for Open WebUI, enabling employee ID single sign-on (SSO) and admin approval workflows.

Features

  • OIDC 1.0 Provider: Implements Discovery, Authorize, Token (JWT), and UserInfo endpoints.
  • Employee ID Auth: Maps internal employee IDs to OIDC identities with generated virtual emails.
  • Access Control: Built-in registration, password management, and admin approval/deletion workflow.
  • CGO-Free: Built with modernc.org/sqlite for effortless cross-compilation.

Configuration

Copy .env.example to .env and adjust the environment variables:

PORT=3090
COMPANY_NAME=企业 AI 智能助手
JWT_SECRET=super_secret_oidc_key_2026
OPENWEBUI_URL=http://192.168.1.220:3080
ADMIN_PASSWORD=admin123
FAKE_EMAIL_DOMAIN=compant.local
HOST_IP=192.168.1.220

Build and Run

Local Development

go run cmd/server/main.go

Cross-Compile for Linux (AMD64)

CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o oidc-gateway cmd/server/main.go

Endpoints

  • Login Page: http://<HOST>:3090/login
  • Admin Panel: http://<HOST>:3090/admin
  • Change Password: http://<HOST>:3090/change-password
  • Discovery: http://<HOST>:3090/.well-known/openid-configuration
  • Authorize: http://<HOST>:3090/oauth/authorize
  • Token: http://<HOST>:3090/oauth/token
  • UserInfo: http://<HOST>:3090/oauth/userinfo

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages