Skip to main content

Module sign_challenge

Module sign_challenge 

Source
Expand description

Handler for hyprstream sign-challenge.

Signs an Ed25519 challenge using the local user identity key stored in the OS keyring.

Two modes:

  1. Device flow: hyprstream sign-challenge ABCD-EFGH

    • Fetches nonce from GET /oauth/device/nonce?user_code=ABCD-EFGH
    • Constructs challenge: "{username}:{user_code_normalized}:{nonce}"
    • Signs and POSTs to /oauth/device/verify automatically
    • Prints: "✓ Device authorized for {username}."
  2. Auth code flow: hyprstream sign-challenge --nonce <n> --code-challenge <cc>

    • Derives the SSH-style key fingerprint (SHA256:...) of the local user signing key.
    • Constructs challenge: "{fingerprint}:{nonce}:{code_challenge}"
    • Prints: "Fingerprint: {fingerprint}\nSignature: {base64}"
    • User pastes these into the browser challenge form. The server resolves the username from the fingerprint via the pubkey reverse index — the client never declares an identity.

Functions§

handle_sign_challenge
Handle hyprstream sign-challenge [USER_CODE] [--nonce N] [--code-challenge CC]