diff options
author | haixunlu <luhaixun@gmail.com> | 2018-12-18 12:49:30 -0800 |
---|---|---|
committer | 无闻 <u@gogs.io> | 2018-12-18 15:49:30 -0500 |
commit | 311df9c521f05cdca880152e73dbed47afb74cde (patch) | |
tree | f3b9159e6dc23e6659e1da5939ff7f09d7a32c16 /pkg/form/auth.go | |
parent | ff93d9dbda5cebe90d86e4b7dfb2c6b8642970ce (diff) |
auth: add new authentication source: GitHub, including GitHub Enterprise (#5340)
* Add new Authentication Source: GitHub, including GitHub Enterprise.
* Add vendor dependencies.
Diffstat (limited to 'pkg/form/auth.go')
-rw-r--r-- | pkg/form/auth.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/form/auth.go b/pkg/form/auth.go index b2ee3ae8..65f5eac0 100644 --- a/pkg/form/auth.go +++ b/pkg/form/auth.go @@ -11,7 +11,7 @@ import ( type Authentication struct { ID int64 - Type int `binding:"Range(2,5)"` + Type int `binding:"Range(2,6)"` Name string `binding:"Required;MaxSize(30)"` Host string Port int @@ -41,6 +41,7 @@ type Authentication struct { TLS bool SkipVerify bool PAMServiceName string + GithubApiEndpoint string `binding:Required;Url` } func (f *Authentication) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { |