aboutsummaryrefslogtreecommitdiff
path: root/internal/db/access_tokens.go
Commit message (Collapse)AuthorAge
* db: refactor "action" table to use GORM (#7054)Joe Chen2022-06-25
| | | Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
* db: add back xorm tag for `AccessToken.UserID` (#7032)Joe Chen2022-06-08
|
* db: rename `AccessTokensStore.Save` to `Touch` (#7029)Joe Chen2022-06-08
|
* db: use `context` and go-mockgen for `AccessTokensStore` (#7013)Joe Chen2022-06-06
|
* access_token: encrypt access token with SHA256 (#7008)E99p1ant2022-06-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* db: code tidy up for `AccessTokens` (#7006)Joe Chen2022-06-04
|
* db: migrate to GORM v2 (#6309)ᴜɴᴋɴᴡᴏɴ2020-09-06
|
* db: use GORM to backup and restore non-legacy tables (#6142)ᴜɴᴋɴᴡᴏɴ2020-05-04
|
* db: add tests for LFS (#6087)ᴜɴᴋɴᴡᴏɴ2020-04-11
| | | | | | | | | * Improve DB test setup * Discard GORM logs in non-verbose mode * Add tests to lfs * Fix data race
* access_token: migrate to GORM and add tests (#6086)ᴜɴᴋɴᴡᴏɴ2020-04-11
| | | | | | | | | * access_token: migrate to GORM * Add tests * Fix tests * Fix test clock
* db: use gorm function to check `ErrRecordNotFound` (#6060)ᴜɴᴋɴᴡᴏɴ2020-04-05
|
* lfs: implement HTTP routes (#6035)ᴜɴᴋɴᴡᴏɴ2020-04-04
* Bootstrap with GORM * Fix lint error * Set conn max lifetime to one minute * Fallback to use gorm v1 * Define HTTP routes * Finish authentication * Save token updated * Add docstring * Finish authorization * serveBatch rundown * Define types in lfsutil * Finish Batch * authutil * Finish basic * Formalize response error * Fix lint errors * authutil: add tests * dbutil: add tests * lfsutil: add tests * strutil: add tests * Formalize 401 response