Skip to content

Drop unused token arg from TokensClient.Validate#1045

Open
c-tonneslan wants to merge 1 commit into
tursodatabase:mainfrom
c-tonneslan:chore/drop-unused-validate-token-arg
Open

Drop unused token arg from TokensClient.Validate#1045
c-tonneslan wants to merge 1 commit into
tursodatabase:mainfrom
c-tonneslan:chore/drop-unused-validate-token-arg

Conversation

@c-tonneslan
Copy link
Copy Markdown

Closes #988.

@sanchitrk noted that TokensClient.Validate(token) ignored the token argument - the validation always runs against whatever token the underlying Client was constructed with. Dropping the unused arg so the signature stops lying. The single caller in cmd/auth.go is updated accordingly. internal/ package so no external API impact.

The arg never made it into the request - validation already piggybacks
on the auth header that tursoClient(token) sets on the client. Dropping
the parameter so it's clear it doesn't override the client's token,
and updating the one caller (cmd/auth.go).

Closes tursodatabase#988

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dumb TokensClient Validate method

1 participant