Skip to content

Latest commit

 

History

History
37 lines (33 loc) · 862 Bytes

tokenFormat.md

File metadata and controls

37 lines (33 loc) · 862 Bytes

Token format

Base64url encoded "train-cars".

  • Cars are separated by periods.
  • There is always the required engine car that specifies the user/server.
  • Trailing are the forms of auth, in order of recommended preference.
  • Minimize whitespace characters on encode to save space

"Engine" (Required)

{
    "typ" : "engine",
    "hsvr":"blackline.xyz",
    "user":"@exmpl:blackline.xyz"
}

"valid token" car

Not to be confused with the m.login.token login method. This is a live session on the server The expiry is a unix time int. Set to 0 for never expire.

{
    "typ" : "valid-token",
    "token" : "alidhfrgb_ASDFajhsd-ddd",
    "exp" : 1633238196,
    "device_id" : "Halcyon Bot"
}

"username and password" car

{
    "typ" : "password",
    "un" : "@exmpl:blackline.xyz",
    "pw" : "bundle0fOranges"
}