User API

The gRPC service behind /api/users/*. It owns registration, login, profiles and tokens.

Methods

Method Purpose
CreateUser Register a new user; publishes user.created
GetUser Fetch a user by ID; also called by the Order API
UpdateUser Change a profile; publishes user.updated
AuthenticateUser Check credentials and issue a JWT and refresh token
RefreshToken Exchange a refresh token for a new JWT

Data

  • Accounts and profiles live in the User DB.
  • Active sessions and refresh tokens live in the Session cache, so logout and token revocation take effect immediately.

Events

Publishes user.created, user.updated and user.deleted to the Event bus after the database transaction commits. The Order API uses user.deleted to anonymize orders; the Notifier uses user.created to send the welcome email.

Deployment

Go, 2 replicas on the services node in prod.

Edit ./docs/containers/user_api.md to change this text.