8 Star 0 Fork 0

YPT_ARCH / usercenter

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 802 Bytes
一键复制 编辑 原始数据 按行查看 历史
a526757124 提交于 2017-06-05 11:43 . Squashed commit of the following:

用户中心

1.用户管理 1) 用户注册-注册成功后自动应用授权 2) OAuth2.0 认证 3) 用户应用授权 手动授权、自动授权

set GOOS=linux

go build -a -ldflags "-w" -o usercenter main.go

也可以设置配置文件 默认直接读配置文件中的设置 全局设置 httpserver的设置 app.HttpServer.SetEnabledCors("GET,POST,PUT").SetOrigin() 指定请求 app.HttpServer.SetEnabledCors() 默认所有请求

路由设置 注 header里面的 origin 默认为* 可以在配置文件中设置也能在 此处设置为单路由跨域 httpServer.Router().GET("", ).EnabledCors().SetOrigin() 此处设置此路由只支持get跨域 httpServer.Router().Post("", ).EnabledCors().SetOrigin() 此处设置此路由只支持get跨域

Go
1
https://gitee.com/YPTArch/usercenter.git
git@gitee.com:YPTArch/usercenter.git
YPTArch
usercenter
usercenter
master

搜索帮助