feat(oauth): upsert replicated Doorkeeper refresh tokens

Why

Adds the repository and gRPC handler behind InternalOAuthDoorkeeperRefreshTokensService.Upsert, writing replicated Doorkeeper refresh tokens to doorkeeper_refresh_tokens (gitlab-org/gitlab#632066 (closed)).

Part 3 of the split of !699 (closed); !805 (merged) (the RPC), !804 (merged) (the table and queries), and !866 (merged) (which renames the request field requested_at to created_at and replaces the scopes rule with a total-length check, field numbers unchanged, wire-compatible) have merged to main. The repository validates only that the signature is a SHA-512 digest, so a plaintext is never stored; the proto rules behind the protovalidate interceptor own every other field. The handler is not registered until part 4, so nothing serves it yet. Zero rows from the upsert means the event was rejected (a stored row under another client is INVALID_ARGUMENT, anything else FAILED_PRECONDITION until the client replicates); a write conflict is ABORTED, as in the tokens handler.

🤖 Generated with Claude Code

Edited by Smriti Garg

Merge request reports

Loading
Loading