Remove tokens package
kegsay opened this issue · comments
Kegan Dougal commented
GMSL is for federation only.
Usages:
- https://github.com/matrix-org/dendrite/blob/main/clientapi/routing/server_notices.go#L26 -
GenerateLoginToken
is called and the token passed touserapi.PerformDeviceCreationRequest
- https://github.com/matrix-org/dendrite/blob/main/clientapi/routing/register.go#L40 - same thing but only for guests. Normal users use
token, err := auth.GenerateAccessToken()
. We should use that instead in all cases.
History:
- This package was added in 2019.
- Intended to be used as macaroons (which are no longer used in Synapse)
- Allows verification of tokens without DB hits.
- In practice we do DB hits and string compare.