Skip to content
go-zooxPublic

About

GoZoox Connect Application

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

444 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoZoox Connect - The Lighweight, Powerful Auth Connect

PkgGoDev Build Status Go Report Card Coverage Status GitHub issues Release

GoZoox Connect 是一个 Auth Connect(or),帮助你无痛接入认证,支持多种认证方式,优先支持 OAuth2,特别支持 Doreamon (类似 Auth0,支持统一应用、用户、权限、配置等)。它可以使用Docker进行部署,并支持私有化部署。此外,connect完全开源。

Installation

To install the package, run:

# with go
go install github.com/go-zoox/connect/cmd/connect@latest

if you dont have go installed, you can use the install script (zmicro package manager):

curl -o- https://raw.githubusercontent.com/zcorky/zmicro/master/install | bash

zmicro package install connect

Features

  • 支持 Oauth2 认证
    • 支持 Doreamon 登录
    • 支持 GitHub 登录
    • 支持飞书登录
  • 支持 Basic Auth 认证
  • 支持 BearToken 认证
  • 使用Docker容器化部署
  • 支持私有化部署
  • Optional built-in admin UI (off by default; see below)

Built-in admin (optional)

By default, admin.enabled is false: routing matches pre-admin releases (core JSON APIs under /api, password login still goes through the core handler with captcha, and no embedded admin UI is mounted).

When admin.enabled: true, Connect serves the embedded admin app under admin.entry (default /admin), registers admin-backed handlers for the built-in JSON API paths (including POST login against the admin database), and requires admin.auth.admin (bootstrap root) plus admin.database (for example SQLite driver: sqlite and a dsn). Validate config with your normal startup path; admin.entry must not overlap /api, backend.prefix, or auth routes (/login, /logout, /register).

See conf/config.local.yml.example and conf/config.full.example for commented YAML.

Detailed docs:

  • Usage guide: docs/builtin-admin-usage.md
  • Implementation report: docs/builtin-admin-report.md
  • Agent workflow / experience: AGENTS.md

Quick Start

Using Command Line

Full Mode

connect serve -c /path/to/config.yaml

Doreamon Mode

export SECRET_KEY=666
export UPSTREAM=https://httpbin.zcorky.com
#
export CLIENT_ID=<YOUR_DOREAMON_CLIENT_ID>
export CLIENT_SECRET=<YOUR_DOREAMON_CLIENT_SECRET>
export REDIRECT_URI=http://127.0.0.1:8080/login/doreamon/callback

connect doreamon

OAuth2 Mode - GitHub

export SECRET_KEY=666
export UPSTREAM=https://httpbin.zcorky.com
#
export CLIENT_ID=<YOUR_GITHUB_CLIENT_ID>
export CLIENT_SECRET=<YOUR_GITHUB_CLIENT_SECRET>
export REDIRECT_URI=http://127.0.0.1:8080/login/github/callback

connect github

OAuth2 Mode - Feishu

export SECRET_KEY=666
export UPSTREAM=https://httpbin.zcorky.com
#
export CLIENT_ID=<YOUR_GITHUB_CLIENT_ID>
export CLIENT_SECRET=<YOUR_GITHUB_CLIENT_SECRET>
export REDIRECT_URI=http://127.0.0.1:8080/login/github/callback

connect feishu

Using Docker / Docker Compose

  1. create docker-compose.yml,这里使用 Doreamon Mode:
# 使用 basic auth
services:
  connect:
    restart: unless-stopped
    image: whatwewant/connect:latest
    ports:
      - 8080:8080
    environment:
      SECRET_KEY: 666
      UPSTREAM: https://httpbin.zcorky.com
      CLIENT_ID: <YOUR_DOREAMON_CLIENT_ID>
      CLIENT_SECRET: <YOUR_DOREAMON_CLIENT_SECRET>
      REDIRECT_URI: http://127.0.0.1:8080/login/doreamon/callback
  1. 启动容器:
$ docker-compose up -d

Usage

NAME:
   connect - The Connector

USAGE:
   connect [global options] command [command options] [arguments...]

VERSION:
   1.16.3

DESCRIPTION:
   Connect between auth with apps/services

COMMANDS:
   serve     Start Connect Server
   none      Start Connect Server using None Auth
   doreamon  Start Connect Server using Doreamon
   github    Start Connect Server using GitHub
   feishu    Start Connect Server using Feishu
   help, h   Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help
   --version, -v  print the version

Refrence

  • go-zoox/gzproxy - Easy to proxy with your http server or any another upstream. Built in supports Basic Auth, Bearer Toke, OAuth2 (GitHub, Feishu, Doreamon, etc.)
  • go-zoox/gzauth - Simple Your Auth for Web Service

贡献

欢迎您参与贡献connect!请参阅 CONTRIBUTING.md 文件了解更多信息。

许可证

connect采用MIT许可证。请参阅 LICENSE.md 文件了解详细信息。

About

GoZoox Connect Application

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages