{"repo":"nilorg/oauth2","free":true,"listed":false,"github":"https://github.com/nilorg/oauth2","clone":"git clone https://github.com/nilorg/oauth2.git","description":"A lightweight and extensible SAAS OAuth 2.0 server and client written in Go. Supports authorization code, client credentials, and password grants. Ideal for modern auth systems and microservices.","language":"Go","stars":13,"topics":["oauth2","oauth2-server","oauth2-client","go-oauth2","go-oauth2-server","go-oauth2-client","go","golang","saas-oauth2-server"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"oauth2 OAuth 2.0 授权框架的 Go 语言实现，支持 SaaS 多租户场景。 Go implementation of OAuth 2.0 Authorization Framework with SaaS multi-tenant support. Features / 特性 - ✅ 授权码模式 (Authorization Code) - ✅ 简化模式 (Implicit) - ✅ 密码模式 (Resource Owner Password Credentials) - ✅ 客户端凭证模式 (Client Credentials) - ✅ 设备授权模式 (Device Code) - RFC 8628 - ✅ 令牌内省 (Token Introspection) - RFC 7662 - ✅ 令牌撤销 (Token Revocation) - RFC 7009 - ✅ PKCE 支持 - RFC 7636 增强公开客户端安全性 - ✅ SaaS 多租户动态 Issuer - 根据请求域名动态生成 JWT issuer - ✅ SaaS 多租户动态 JWT 密钥 - 每个租户使用独立的签名密钥 - ✅ 反向代理支持 - 支持 X-Forwarded- 头部 Installation / 安装 Import / 导入 Quick Start / 快速开始 基础用法 / Basic Usage SaaS 多租户场景 / SaaS Multi-tenant Scenario 反向代理场景 / Reverse Proxy Scenario 自定义 IssuerRequest 提取 / Custom IssuerRequest Extraction 静态 Issuer（单租户）/ Static Issuer (Single Tenant) 多租户 JWT 密钥 / Multi-tenant JWT Key PKCE Support / PKCE 支持 PKCE (Proof Key for Code Exchange) 是 RFC 7636 定义的扩展，用于增强公开客户端（如移动应用、单页应用）的安全性。 客户端实现 / Client Implementation 服务端实现 / Server Implementation Examples / 示例 oauth2-server server/client examples Documentation / 文档参考 1. 《理解OAuth 2.0》阮一峰 2. RFC 6749 - The OAuth 2.0 Authorization Framework 3. RFC 7636 - Proof Key for Code Exchange (PKCE) 4. RFC 8628 - OAuth 2.0 Device Authorization Grant 5. RFC 7662 - OAuth 2.0 Token Introspection 6. RFC 7009 - OAuth 2.0 Token Revocation Grant Types / 授权模式 Authorization Code / 授权码模式 授权码模式是功能最完整、流程最严密的授权模式。它的特点就是通过客户端的后台服务器，与\"服务提供商\"的认证服务器进行互动。 Implicit / 简化模式 简化模式不通过第三方应用程序的服务器，直接在浏览器中向认证服务器申请令牌，跳过了\"授权码\"这个步骤。 Resource Owner ","default_branch":null,"files":null,"tree":[],"storefront":"/r/nilorg","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nilorg/oauth2/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}