forgejo/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 Fix SQL bug in models/access (#583) 2017-01-05 08:57:54 +08:00
access_test.go Unit tests and bug fix for models/org 2017-01-27 12:24:06 -05:00
action.go Fix FIXME and remove superfluous queries in models/org (#749) 2017-01-25 23:41:38 +08:00
action_test.go Less boilerplate in models/ unit tests (#725) 2017-01-25 10:49:51 +08:00
admin.go Unit tests for models/admin 2017-01-09 21:49:51 +01:00
admin_test.go Unit tests for models/admin 2017-01-09 21:49:51 +01:00
attachment.go Allow custom public files (#782) 2017-01-28 23:14:56 +01:00
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 Refactor process package and introduce ProcessManager{} with tests (#75) 2017-01-17 13:58:58 +08:00
git_diff_test.go fix gofmt error 2016-12-30 20:41:10 +01:00
graph.go Fix typos in models/ (#576) 2017-01-05 08:50:34 +08:00
graph_test.go Fix benchmarktests (#557) 2017-01-03 10:52:09 +08:00
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 Search bar for issues/pulls (#530) 2017-01-25 10:43:02 +08:00
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 Fix typos in models/ (#576) 2017-01-05 08:50:34 +08:00
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 Move IssueUser code to separate file (#836) 2017-02-04 20:37:26 +08:00
lfs.go Git LFS support v2 (#122) 2016-12-26 09:16:37 +08:00
login_source.go Oauth2 consumer (#679) 2017-02-22 08:14:37 +01:00
mail.go Implement sendmail (#355) 2016-12-25 14:55:22 +01:00
models.go Make Xorm log configurable (#174) 2017-02-20 16:11:13 +08:00
models_sqlite.go go vet 2014-04-13 03:14:43 -04:00
models_test.go fix: gofmt error. (#918) 2017-02-14 10:12:03 +08:00
models_tidb.go Remove go version from build tags (#133) 2016-11-10 08:43:49 -02:00
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 Check for manual merging of a pull request (#719) 2017-02-05 21:07:44 +08:00
pull_test.go Consistency checks for unit tests (#853) 2017-02-07 19:47:55 +08:00
release.go Refactor process package and introduce ProcessManager{} with tests (#75) 2017-01-17 13:58:58 +08:00
repo.go Protected branches system (#339) 2017-02-21 23:02:10 +08:00
repo_branch.go Lint models/repo_branch.go 2016-11-26 11:20:37 +01:00
repo_collaboration.go API Endpoints for collaborators (#375) 2016-12-26 15:37:01 +08:00
repo_editor.go Cleanup log messaging 2017-02-02 15:24:18 +01:00
repo_mirror.go Cleanup log messaging 2017-02-02 15:24:18 +01:00
repo_redirect.go Redirects for renamed repos (#807) 2017-02-05 22:35:03 +08:00
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 Add units concept for modulable functions of a repository (#742) 2017-02-04 23:53:46 +08:00
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 Create missing database indexes (#596) 2017-01-06 23:14:33 +08:00
token_test.go Less boilerplate in models/ unit tests (#725) 2017-01-25 10:49:51 +08:00
twofactor.go Two factor authentication support (#630) 2017-01-16 10:14:29 +08:00
unit.go Add units concept for modulable functions of a repository (#742) 2017-02-04 23:53:46 +08:00
update.go Cleanup log messaging 2017-02-02 15:24:18 +01:00
update_test.go Less boilerplate in models/ unit tests (#725) 2017-01-25 10:49:51 +08:00
user.go Oauth2 consumer (#679) 2017-02-22 08:14:37 +01:00
user_mail.go Fix typos in models/ (#576) 2017-01-05 08:50:34 +08:00
user_mail_test.go test: Add user mail testing. (#833) 2017-02-04 09:20:56 +08:00
user_test.go feat: Able to disable non-admin to create new organization (#927) 2017-02-14 20:16:00 +08:00
webhook.go Add X-GitHub-* headers for webhook to get clubhouse.io integration working (#809) 2017-02-02 11:51:19 +08:00
webhook_slack.go Fix typos in models/ (#576) 2017-01-05 08:50:34 +08:00
webhook_test.go Bug fixes and unit tests for models/webhook (#751) 2017-01-25 18:37:35 +08:00
wiki.go Cleanup log messaging 2017-02-02 15:24:18 +01:00
wiki_test.go Better settings for unit tests (#795) 2017-01-30 13:17:43 +08:00