matrix-org / matrix-org/gomatrixserverlib
Remove tokens package
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 67
- Forks
- 60
- PR merge metrics
- No merged PRs in 30d
Description
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 to `userapi.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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked call sites in clientapi/routing/server_notices.go and clientapi/routing/register.go, then inspect GenerateLoginToken, userapi.PerformDeviceCreationRequest, and auth.GenerateAccessToken. Confirm how each caller currently obtains and passes tokens. Done means the tokens package is no longer used and all identified cases use the access-token path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100