Commit Graph

56 Commits (d21d5fd736758b66102d6a75a189db578e06e377)

Author SHA1 Message Date
Willem van Dreumel 01d957677f Oauth2 consumer ()
* initial stuff for oauth2 login, fails on:
* login button on the signIn page to start the OAuth2 flow and a callback for each provider
Only GitHub is implemented for now
* show login button only when the OAuth2 consumer is configured (and activated)
* create macaron group for oauth2 urls
* prevent net/http in modules (other then oauth2)
* use a new data sessions oauth2 folder for storing the oauth2 session data
* add missing 2FA when this is enabled on the user
* add password option for OAuth2 user , for use with git over http and login to the GUI
* add tip for registering a GitHub OAuth application
* at startup of Gitea register all configured providers and also on adding/deleting of new providers
* custom handling of errors in oauth2 request init + show better tip
* add ExternalLoginUser model and migration script to add it to database
* link a external account to an existing account (still need to handle wrong login and signup) and remove if user is removed
* remove the linked external account from the user his settings
* if user is unknown we allow him to register a new account or link it to some existing account
* sign up with button on signin page (als change OAuth2Provider structure so we can store basic stuff about providers)

* from gorilla/sessions docs:
"Important Note: If you aren't using gorilla/mux, you need to wrap your handlers with context.ClearHandler as or else you will leak memory!"
(we're using gorilla/sessions for storing oauth2 sessions)

* use updated goth lib that now supports getting the OAuth2 user if the AccessToken is still valid instead of re-authenticating (prevent flooding the OAuth2 provider)
Ethan Koenig e86d935175 Avoid duplicate queries in auth ()
Avoid identical making calls to GetUserByID(..) in SignedInUser(..)
Kim "BKC" Carlbäcker e6cfccdd40 GitHub API Compliance (& linting)
Lunny Xiao ec87a75c00 golint fixed for modules/auth
Sandro Santilli 4247304f5a Update import paths from github.com/go-gitea to code.gitea.io ()
- Update import paths from github.com/go-gitea to code.gitea.io
- Fix import path for travis

See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
Rémy Boulanouar 2d68bd1ef9 Change import reference to match gitea instead of gogs ()
Franz Schmidt 8b35c194ec Fixes ()
Unknwon ac78bae7b5 Replace uuid module with original package
zhuharev 0d5dc8a064 typo fix
Unknwon 7d72c8333e work on and fix miror JS issue when choose targets on compare and pull
Unknwon 932dbccb67 fix import path, fix
Unknwon 65e73c4ac6 support URL param to token, but still restrict to APIs
Unknwon 2ac8e11f46 able to use access token replace basic auth
Unknwon bb3b90fcd6 Readme Template
Unknwon 03b85b73af token recent activity
Unknwon 407385db7e work on
Unknwon dea3a8c6a4 WIP: create PR - choose branch
Unknwon e50982f5ec allow anonymous SSH clone
Unknwon ac95f6d50f UI: basic label list
- create new label
Unknwon ff051e2106 : API calls are not hidden behind sign in
Unknwon 5cf3732339 UI: install - new version
Gogs fab038b175 Attempt of ldap fixes
Unknwon b293b6eaa6 cmd: CMD option for port number of `gogs web` to prevent first time run conflict
- routers: use new binding convention to simplify code
- templates: able to set HTTP port number in install page
Unknwon 9803c421f5 fix binding api broken
Joseph Crail 39c068400e Fix spelling errors in comments.
Unknwon 0b785ad967 work on
Unknwon 069486d169 fix
Unknwon 37d8d3afe9 more APIs on
Unknwon 8eb5120fbd , API: list user repos, list repo hooks
Unknwon 8c9338a537 add personal access token panel
Unknwon e0de6cb5ad work on and update locales
Unknwon fa241efa6d Use binding middleware
Unknwon 669552e255 Fix
Unknwon 8dd07c0ddd New UI merge in progress
Unknown 465dc962b5 Finish create organization team
Lunny Xiao 55019bfbc5 merge all login methods
Unknown 09dba7d63e Clean names
Unknown 6e3dba2cc5 Clean repo code
Unknown bbdfe25769 User code clean and ui improve
Unknown c1eb4d894a Clean api code
Lunny Xiao d8136c9c3c Merge branch 'dev-ldap' into dev
Lunny Xiao 1652dd5068 basic authentications
Unknown 816c0ed5e7 Fix import path
Unknown d0ea4c7b68 Fix
Unknown 2a1dc0085b fix
Unknown 62240b6bc1 Add login by email
Unknown 5c2da610a2 Move binding as subrepo
Unknown 90f6aa8cd1 Add repo mirror and import
Unknown d0e6a4c25a Change new martini impot path
Unknown 107a1eadac Finish close and reopen issue, install page, ready going to test stage of v0.2.0