aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/api_gpg_keys_test.go
Commit message (Collapse)AuthorAgeFilesLines
* format with gofumpt (#18184)65432022-01-201-14/+16
| | | | | | | | | | | * gofumpt -w -l . * gofumpt -w -l -extra . * Add linter * manual fix * change make fmt
* Add option to provide signature for a token to verify key ownership (#14054)zeripath2021-07-131-18/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Always store primary email address into email_address table and also the ↵Lunny Xiao2021-06-081-33/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | state (#15956) * Always store primary email address into email_address table and also the state * Add lower_email to not convert email to lower as what's added * Fix fixture * Fix tests * Use BeforeInsert to save lower email * Fix v180 migration * fix tests * Fix test * Remove wrong submited codes * Fix test * Fix test * Fix test * Add test for v181 migration * remove change user's email to lower * Revert change on user's email column * Fix lower email * Fix test * Fix test
* Fixed assert statements. (#16089)KN4CK3R2021-06-071-13/+13
|
* Handle expected errors in AddGPGkey API (#11644)65432020-05-281-1/+1
| | | | | | | | | * handle GPG Parse & Email Errors * correct TEST * update Swagger * more Docu
* Fix "data race" in testlogger (#9159)zeripath2019-11-261-1/+1
| | | | | | * Fix data race in testlogger * Update git_helper_for_declarative_test.go
* Move sdk structs to modules/structs (#6905)Lunny Xiao2019-05-111-1/+1
| | | | | | | | | | | | * move sdk structs to moduels/structs * fix tests * fix fmt * fix swagger * fix vendor
* Enforce token on api routes [fixed critical security issue #4357] (#4840)B-OnTheGo2018-09-101-35/+37
|
* Use httptest in integration tests (#3080)Ethan Koenig2017-12-041-33/+36
|
* Only check at least one email gpg key (#2266)Antoine GIRARD2017-09-051-0/+260
* Only require one email (possibly not yet validated) * Update message error and check validation of commit * Add integrations tests * Complete integration for import * Add pre-check/optimization * Add some test (not finished) * Finish * Fix fixtures * Fix typo * Don't guess key ID