Managoat.OAuth.DeviceGrant (managoat_oauth v0.1.1)

Copy Markdown View Source

A device-authorization grant (RFC 8628 shape).

Two codes, two audiences: the high-entropy device_code (stored hashed) stays on the machine that started the flow and is what the poller asks with; the short user_code is what a human types into the host's approval page. subject_id is null until a signed-in subject approves or denies, and is stored in the column Managoat.OAuth.Migration names user_id by default. Single use (used_at), fifteen minutes to live.

Summary

Types

t()

@type t() :: %Managoat.OAuth.DeviceGrant{
  __meta__: term(),
  approved_at: term(),
  denied_at: term(),
  device_code_hash: term(),
  expires_at: term(),
  id: term(),
  inserted_at: term(),
  last_polled_at: term(),
  subject_id: term(),
  updated_at: term(),
  used_at: term(),
  user_code: term()
}