11 Commits

Author SHA1 Message Date
Joe Chen
2e19f5a3c8
db: add tests for authentication through login sources (#7049) 2022-06-12 10:34:12 +08:00
Joe Chen
1df62fafb9
db: use context and go-mockgen for ReposStore (#7046) 2022-06-11 12:43:56 +08:00
Joe Chen
5e32058c13
db: use context and go-mockgen for TwoFactorsStore (#7045) 2022-06-11 11:54:11 +08:00
Joe Chen
f837ea6346
db: use context and go-mockgen for UsersStore (#7042) 2022-06-11 09:42:17 +08:00
Joe Chen
7229dd893f
db: use context and go-mockgen for PermsStore (#7033) 2022-06-08 19:26:20 +08:00
Joe Chen
0a92ad27ef
db: use context and go-mockgen for AccessTokensStore (#7013) 2022-06-06 12:10:36 +08:00
E99p1ant
a328e7ccc4
access_token: encrypt access token with SHA256 (#7008)
* access_token: encrypt access token with SHA256

* revert list access token

* fix lint

* generate schemadoc

* add database migrations

* fix tests

* fix tests

* add test case for access token golden

* fix test in postgres

* `Sha256` -> `SHA256`

* Use GORM for migration

* task generate-schemadoc

* Use unique

* change migration name

* allow read

* task generate-schemadoc

* add changelog

* fix lint error

* update changelog

* remove Debug

* add comments

Co-authored-by: Joe Chen <jc@unknwon.io>
2022-06-05 13:34:21 +08:00
ᴜɴᴋɴᴡᴏɴ
2eaf1d693a
db: migrate access table to use GORM (#6371) 2020-10-06 15:43:28 +08:00
ᴜɴᴋɴᴡᴏɴ
3af91d7cfd
auth: decouple types and functions from db (#6320) 2020-09-20 11:19:02 +08:00
ᴜɴᴋɴᴡᴏɴ
62dda96159
access_token: migrate to GORM and add tests (#6086)
* access_token: migrate to GORM

* Add tests

* Fix tests

* Fix test clock
2020-04-11 01:25:19 +08:00
ᴜɴᴋɴᴡᴏɴ
ee0ea2c5fc
lfs: add unit test for middleware (#6070)
* Add unit test for `authenticate` middleware

* Add more cases

* Add tests for verifyOID and internalServerError

* Add tests for verifyHeader

* Add tests for authroize
2020-04-06 18:35:10 +08:00