0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-03 12:48:59 +01:00
gitea/models
Willem van Dreumel 01d957677f Oauth2 consumer (#679)
* 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)
2017-02-22 08:14:37 +01:00
..
fixtures Unit tests for repo watching (#963) 2017-02-17 16:02:11 +08:00
migrations Oauth2 consumer (#679) 2017-02-22 08:14:37 +01:00
access.go
access_test.go
action.go
action_test.go
admin.go
admin_test.go
attachment.go
branches.go Protected branches system (#339) 2017-02-21 23:02:10 +08:00
consistency_test.go Fix consistency check (#866) 2017-02-08 14:29:21 +08:00
error.go Oauth2 consumer (#679) 2017-02-22 08:14:37 +01:00
external_login_user.go Oauth2 consumer (#679) 2017-02-22 08:14:37 +01:00
git_diff.go
git_diff_test.go
graph.go
graph_test.go
issue.go Fix all the bugs in issues and pulls on dashboard (#943) 2017-02-17 08:58:19 +08:00
issue_comment.go Bug fixed for deleted label in issue comment (#904) 2017-02-11 20:56:57 +08:00
issue_indexer.go
issue_label.go small optimization for get issue labels 2017-02-12 06:46:51 +01:00
issue_label_test.go Fix consistency check (#866) 2017-02-08 14:29:21 +08:00
issue_mail.go
issue_milestone.go Unit tests for issue_milestone (#878) 2017-02-09 14:39:26 +08:00
issue_milestone_test.go Unit tests for issue_milestone (#878) 2017-02-09 14:39:26 +08:00
issue_user.go Gogs -> Gitea (#877) 2017-02-09 13:44:18 +08:00
issue_user_test.go
lfs.go
login_source.go Oauth2 consumer (#679) 2017-02-22 08:14:37 +01:00
mail.go
models.go Make Xorm log configurable (#174) 2017-02-20 16:11:13 +08:00
models_sqlite.go
models_test.go fix: gofmt error. (#918) 2017-02-14 10:12:03 +08:00
models_tidb.go
notification.go refactor notificationsForUser since xorm In support slice of customerize type (#956) 2017-02-16 12:07:00 +08:00
notification_test.go Consistency checks for unit tests (#853) 2017-02-07 19:47:55 +08:00
org.go bug fixed on issues and pulls 2017-02-15 01:17:07 +01:00
org_team.go optimization for team get repos (#953) 2017-02-16 12:07:58 +08:00
org_test.go Consistency checks for unit tests (#853) 2017-02-07 19:47:55 +08:00
pull.go
pull_test.go Consistency checks for unit tests (#853) 2017-02-07 19:47:55 +08:00
release.go
repo.go Protected branches system (#339) 2017-02-21 23:02:10 +08:00
repo_branch.go
repo_collaboration.go
repo_editor.go
repo_mirror.go
repo_redirect.go
repo_redirect_test.go Unit tests for repo redirects (#961) 2017-02-17 08:55:33 +08:00
repo_test.go test: Add testing for GetUserFork function (#944) 2017-02-15 23:24:23 +08:00
repo_unit.go
repo_watch.go Unit tests for repo watching (#963) 2017-02-17 16:02:11 +08:00
repo_watch_test.go Unit tests for repo watching (#963) 2017-02-17 16:02:11 +08:00
setup_for_test.go Consistency checks for unit tests (#853) 2017-02-07 19:47:55 +08:00
ssh_key.go Use fingerprint to check instead content for public key (#911) 2017-02-14 14:12:52 +08:00
ssh_key_test.go Use assert in legacy unit tests (#867) 2017-02-08 14:29:07 +08:00
star.go refactor: small optimize for sql query (#940) 2017-02-15 14:01:50 +08:00
star_test.go feat: support search bar on star tab of user profile. (#917) 2017-02-14 15:28:22 +08:00
token.go
token_test.go
twofactor.go
unit.go
update.go
update_test.go
user.go Oauth2 consumer (#679) 2017-02-22 08:14:37 +01:00
user_mail.go
user_mail_test.go
user_test.go feat: Able to disable non-admin to create new organization (#927) 2017-02-14 20:16:00 +08:00
webhook.go
webhook_slack.go
webhook_test.go
wiki.go
wiki_test.go