Skip to content

Instantly share code, notes, and snippets.

@oestrich
Last active January 6, 2024 14:40
Show Gist options
  • Save oestrich/1fc022a448c36ac2aa5a099f4ca3778c to your computer and use it in GitHub Desktop.
Save oestrich/1fc022a448c36ac2aa5a099f4ca3778c to your computer and use it in GitHub Desktop.
OAuth for Telnet

OAuth for Clients

Telnet Option

Constants:

  • IAC: 255
  • WILL: 251
  • WONT: 252
  • DO: 253
  • DONT: 254
  • OAUTH: 165
Server (Game): IAC DO OAUTH
Client (Grapevine): IAC WILL OAUTH
Client: IAC SB OAUTH Start {host: "grapevine.haus"} IAC SE
Server: IAC SB OAUTH AuthorizationRequest {response_type: "code", client_id: "...", 
  scope: "...", state: "..."} IAC SE
Client: Requests confirmation from the user, displays a standard OAuth request asking
  for scopes and the connection
User: Approves request
Client: IAC SB OAUTH AuthorizationGrant {state: "same as above", code: "..."} IAC SE

Server then goes through standard OAuth

Defaults:

  • Client: IAC DONT OAUTH
  • Server: IAC WONT OAUTH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment