~bigbes/core-go

ref: a941162edd28c03abb3a10fcddd4ec4bdf651946 core-go/auth/middleware_test.go -rw-r--r-- 5.9 KiB
b2c8e81e — Conrad Hoffmann 4 years ago
Fix (some) user PGP key lookups from meta.sr.ht

The authForUsername() function uses a closure that is almost identical
to the LookupUser() function, but is missing the handling for the PGP
key if called from meta.sr.ht. This causes at least the email
notifications for new OAuth2 tokens to be sent unencrypted. This commit
fixes that (and reduces code duplication) by calling LookupUser()
instead.

This requires the context for the tests to have a value for the calling
service, so add that to the mock.
af2afebd — Drew DeVault 5 years ago
Add legacy webhooks worker implementation
dc469471 — Drew DeVault 5 years ago
Add test for internal auth
b335efbd — Drew DeVault 5 years ago
auth/middleware_test: test invalid auth cookie
bfc744fc — Drew DeVault 5 years ago
Add basic auth tests