Documentation
¶
Overview ¶
Package devicesession supplies per-device session generations. Rotating a generation revokes all sessions for that device, including offline clients, without scanning Redis or affecting the user's other sessions.
Index ¶
- Constants
- func AcquireEpoch(ctx context.Context, client *redis.Client, id int64) (string, error)
- func Binding(claims map[string]interface{}) (id int64, epoch string, err error)
- func Epoch(ctx context.Context, client *redis.Client, id int64) (string, error)
- func Revoke(ctx context.Context, client *redis.Client, id int64) error
Constants ¶
View Source
const ( IDClaim = "DeviceId" EpochClaim = "DeviceEpoch" )
Variables ¶
This section is empty.
Functions ¶
func AcquireEpoch ¶
AcquireEpoch is used only when issuing a new, authenticated session. A missing generation during token validation must never default to an old value: eviction of a key must not resurrect a previously revoked token.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.