1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-09-12 00:34:20 -04:00
gitea/modules/structs
zeripath b82293270c
Add option to provide signature for a token to verify key ownership (#14054)
* Add option to provide signed token to verify key ownership

Currently we will only allow a key to be matched to a user if it matches
an activated email address. This PR provides a different mechanism - if
the user provides a signature for automatically generated token (based
on the timestamp, user creation time, user ID, username and primary
email.

* Ensure verified keys can act for all active emails for the user

* Add code to mark keys as verified

* Slight UI adjustments

* Slight UI adjustments 2

* Simplify signature verification slightly

* fix postgres test

* add api routes

* handle swapped primary-keys

* Verify the no-reply address for verified keys

* Only add email addresses that are activated to keys

* Fix committer shortcut properly

* Restructure gpg_keys.go

* Use common Verification Token code

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-07-13 15:28:07 +02:00
..
admin_user.go
attachment.go
commit_status.go
cron.go
doc.go
fork.go
git_blob.go Move sdk structs to modules/structs (#6905) 2019-05-11 18:21:34 +08:00
git_hook.go Move sdk structs to modules/structs (#6905) 2019-05-11 18:21:34 +08:00
hook.go
issue_comment.go
issue_label.go
issue_milestone.go
issue_reaction.go
issue_stopwatch.go
issue_tracked_time.go
issue.go
lfs_lock.go Move sdk structs to modules/structs (#6905) 2019-05-11 18:21:34 +08:00
miscellaneous.go
notifications.go
org_member.go
org_team.go Add missing repo.projects unit into swagger (#14876) 2021-03-03 23:44:30 +01:00
org_type.go Fixes #7023 - API Org Visibility (#7028) 2019-05-30 13:57:55 -04:00
org.go
pull_review.go
pull.go
release.go
repo_branch.go
repo_collaborator.go
repo_commit.go
repo_file.go
repo_key.go Move sdk structs to modules/structs (#6905) 2019-05-11 18:21:34 +08:00
repo_refs.go
repo_tag.go [API] Add repoCreateTag (#16165) 2021-06-17 18:04:10 +02:00
repo_topic.go
repo_tree.go
repo_watch.go
repo.go
settings.go Add custom emoji support (#16004) 2021-06-29 16:28:38 +02:00
status.go
task.go
user_app.go Remove Unused Functions (#10516) 2020-03-02 00:05:44 +02:00
user_email.go
user_gpgkey.go
user_key.go Move sdk structs to modules/structs (#6905) 2019-05-11 18:21:34 +08:00
user.go