mirror of https://github.com/go-gitea/gitea.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
`models` does far too much. In particular it handles all `UserSignin`. It shouldn't be responsible for calling LDAP, SMTP or PAM for signing in. Therefore we should move this code out of `models`. This code has to depend on `models` - therefore it belongs in `services`. There is a package in `services` called `auth` and clearly this functionality belongs in there. Plan: - [x] Change `auth.Auth` to `auth.Method` - as they represent methods of authentication. - [x] Move `models.UserSignIn` into `auth` - [x] Move `models.ExternalUserLogin` - [x] Move most of the `LoginVia*` methods to `auth` or subpackages - [x] Move Resynchronize functionality to `auth` - Involved some restructuring of `models/ssh_key.go` to reduce the size of this massive file and simplify its files. - [x] Move the rest of the LDAP functionality in to the ldap subpackage - [x] Re-factor the login sources to express an interfaces `auth.Source`? - I've done this through some smaller interfaces Authenticator and Synchronizable - which would allow us to extend things in future - [x] Now LDAP is out of models - need to think about modules/auth/ldap and I think all of that functionality might just be moveable - [x] Similarly a lot Oauth2 functionality need not be in models too and should be moved to services/auth/source/oauth2 - [x] modules/auth/oauth2/oauth2.go uses xorm... This is naughty - probably need to move this into models. - [x] models/oauth2.go - mostly should be in modules/auth/oauth2 or services/auth/source/oauth2 - [x] More simplifications of login_source.go may need to be done - Allow wiring in of notify registration - *this can now easily be done - but I think we should do it in another PR* - see #16178 - More refactors...? - OpenID should probably become an auth Method but I think that can be left for another PR - Methods should also probably be cleaned up - again another PR I think. - SSPI still needs more refactors.* Rename auth.Auth auth.Method * Restructure ssh_key.go - move functions from models/user.go that relate to ssh_key to ssh_key - split ssh_key.go to try create clearer function domains for allow for future refactors here. Signed-off-by: Andrew Thornton <art27@cantab.net> |
4 years ago | |
---|---|---|
.. | ||
fixtures | 4 years ago | |
migrations | 4 years ago | |
access.go | 4 years ago | |
access_test.go | 5 years ago | |
action.go | 4 years ago | |
action_list.go | 7 years ago | |
action_test.go | 4 years ago | |
admin.go | 4 years ago | |
admin_test.go | 8 years ago | |
attachment.go | 4 years ago | |
attachment_test.go | 4 years ago | |
avatar.go | 4 years ago | |
avatar_test.go | 4 years ago | |
branches.go | 4 years ago | |
branches_test.go | 7 years ago | |
commit_status.go | 4 years ago | |
commit_status_test.go | 4 years ago | |
consistency.go | 4 years ago | |
consistency_test.go | 4 years ago | |
context.go | 4 years ago | |
convert.go | 4 years ago | |
error.go | 4 years ago | |
error_oauth2.go | 8 years ago | |
external_login_user.go | 4 years ago | |
fixture_generation.go | 4 years ago | |
fixture_test.go | 5 years ago | |
gpg_key.go | 4 years ago | |
gpg_key_add.go | 4 years ago | |
gpg_key_commit_verification.go | 4 years ago | |
gpg_key_common.go | 4 years ago | |
gpg_key_import.go | 4 years ago | |
gpg_key_test.go | 4 years ago | |
gpg_key_verify.go | 4 years ago | |
helper.go | 4 years ago | |
helper_directory.go | 5 years ago | |
helper_environment.go | 4 years ago | |
index.go | 4 years ago | |
index_test.go | 4 years ago | |
issue.go | 4 years ago | |
issue_assignees.go | 4 years ago | |
issue_assignees_test.go | 4 years ago | |
issue_comment.go | 4 years ago | |
issue_comment_list.go | 4 years ago | |
issue_comment_test.go | 7 years ago | |
issue_dependency.go | 4 years ago | |
issue_dependency_test.go | 5 years ago | |
issue_label.go | 4 years ago | |
issue_label_test.go | 4 years ago | |
issue_list.go | 4 years ago | |
issue_list_test.go | 5 years ago | |
issue_lock.go | 4 years ago | |
issue_milestone.go | 4 years ago | |
issue_milestone_test.go | 4 years ago | |
issue_reaction.go | 4 years ago | |
issue_reaction_test.go | 5 years ago | |
issue_stopwatch.go | 4 years ago | |
issue_stopwatch_test.go | 4 years ago | |
issue_test.go | 4 years ago | |
issue_tracked_time.go | 4 years ago | |
issue_tracked_time_test.go | 4 years ago | |
issue_user.go | 5 years ago | |
issue_user_test.go | 5 years ago | |
issue_watch.go | 4 years ago | |
issue_watch_test.go | 4 years ago | |
issue_xref.go | 4 years ago | |
issue_xref_test.go | 4 years ago | |
lfs.go | 4 years ago | |
lfs_lock.go | 4 years ago | |
list_options.go | 4 years ago | |
log.go | 4 years ago | |
login_source.go | 4 years ago | |
main_test.go | 5 years ago | |
migrate.go | 4 years ago | |
models.go | 4 years ago | |
models_test.go | 4 years ago | |
notification.go | 4 years ago | |
notification_test.go | 5 years ago | |
oauth2.go | 4 years ago | |
oauth2_application.go | 4 years ago | |
oauth2_application_test.go | 4 years ago | |
org.go | 4 years ago | |
org_team.go | 4 years ago | |
org_team_test.go | 4 years ago | |
org_test.go | 4 years ago | |
project.go | 4 years ago | |
project_board.go | 4 years ago | |
project_issue.go | 4 years ago | |
project_test.go | 4 years ago | |
protected_tag.go | 4 years ago | |
protected_tag_test.go | 4 years ago | |
pull.go | 4 years ago | |
pull_list.go | 5 years ago | |
pull_sign.go | 4 years ago | |
pull_test.go | 4 years ago | |
release.go | 4 years ago | |
repo.go | 4 years ago | |
repo_activity.go | 5 years ago | |
repo_archiver.go | 4 years ago | |
repo_avatar.go | 4 years ago | |
repo_branch.go | 5 years ago | |
repo_collaboration.go | 4 years ago | |
repo_collaboration_test.go | 5 years ago | |
repo_generate.go | 4 years ago | |
repo_generate_test.go | 4 years ago | |
repo_indexer.go | 5 years ago | |
repo_issue.go | 7 years ago | |
repo_language_stats.go | 4 years ago | |
repo_list.go | 4 years ago | |
repo_list_test.go | 4 years ago | |
repo_mirror.go | 4 years ago | |
repo_permission.go | 4 years ago | |
repo_permission_test.go | 6 years ago | |
repo_pushmirror.go | 4 years ago | |
repo_pushmirror_test.go | 4 years ago | |
repo_redirect.go | 4 years ago | |
repo_redirect_test.go | 4 years ago | |
repo_sign.go | 4 years ago | |
repo_test.go | 4 years ago | |
repo_transfer.go | 4 years ago | |
repo_transfer_test.go | 4 years ago | |
repo_unit.go | 4 years ago | |
repo_watch.go | 4 years ago | |
repo_watch_test.go | 5 years ago | |
review.go | 4 years ago | |
review_test.go | 4 years ago | |
session.go | 4 years ago | |
sql_postgres_with_schema.go | 4 years ago | |
ssh_key.go | 4 years ago | |
ssh_key_authorized_keys.go | 4 years ago | |
ssh_key_authorized_principals.go | 4 years ago | |
ssh_key_deploy.go | 4 years ago | |
ssh_key_fingerprint.go | 4 years ago | |
ssh_key_parse.go | 4 years ago | |
ssh_key_principals.go | 4 years ago | |
ssh_key_test.go | 4 years ago | |
star.go | 4 years ago | |
star_test.go | 5 years ago | |
store.go | 4 years ago | |
task.go | 4 years ago | |
test_fixtures.go | 4 years ago | |
token.go | 4 years ago | |
token_test.go | 4 years ago | |
topic.go | 4 years ago | |
topic_test.go | 4 years ago | |
twofactor.go | 4 years ago | |
u2f.go | 6 years ago | |
u2f_test.go | 5 years ago | |
unit.go | 5 years ago | |
unit_tests.go | 4 years ago | |
update.go | 5 years ago | |
upload.go | 4 years ago | |
user.go | 4 years ago | |
user_avatar.go | 4 years ago | |
user_follow.go | 4 years ago | |
user_follow_test.go | 5 years ago | |
user_heatmap.go | 4 years ago | |
user_heatmap_test.go | 4 years ago | |
user_mail.go | 4 years ago | |
user_mail_test.go | 4 years ago | |
user_openid.go | 4 years ago | |
user_openid_test.go | 4 years ago | |
user_redirect.go | 4 years ago | |
user_redirect_test.go | 4 years ago | |
user_test.go | 4 years ago | |
userlist.go | 4 years ago | |
userlist_test.go | 4 years ago | |
webhook.go | 4 years ago | |
webhook_test.go | 4 years ago | |
wiki.go | 4 years ago | |
wiki_test.go | 5 years ago |