feat: 初始提交 - Code Server Bridge完整实现
- OAuth认证系统(Gitea + Lua扩展) - Git自动化操作(本地/SSH远程) - 实时进度WebSocket推送 - 现代化Tab界面UI - Cobra CLI命令行(init/version/serve) - 完整构建系统(Makefile + Taskfile) - UPX压缩支持(体积减少70%)
This commit is contained in:
16
internal/oauth/provider.go
Normal file
16
internal/oauth/provider.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package oauth
|
||||
|
||||
import "cs-bridge/internal/auth"
|
||||
|
||||
type UserInfo struct {
|
||||
ID string `json:"id"`
|
||||
Username string `json:"username"`
|
||||
Avatar string `json:"avatar_url"`
|
||||
}
|
||||
|
||||
type Provider interface {
|
||||
Name() string
|
||||
AuthURL(state string) (string, error)
|
||||
Exchange(code string) (string, error)
|
||||
UserInfo(token string) (auth.Identify, error)
|
||||
}
|
||||
Reference in New Issue
Block a user