user-service

module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2025 License: MPL-2.0

README

User Service

Session & Token

  • Session indicates a specific connection between user's browser/device and the server.
    • Can be stored as a set owns by the user. When we need to revoke some of the sessions, removing the session from the set will do the job.
  • Token is a string that can be used to authenticate the user. In services, it can be decrypted to get the user Info.
    • Token changes when user updates their info or roles.
    • For safety, token should be have a short expiration time, e.g. 1 hour, we refresh it when it's about to expire.

Directories

Path Synopsis
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL