Skip to content

Instantly share code, notes, and snippets.

@mwanji
Created October 6, 2012 10:58
Show Gist options
  • Save mwanji/3844608 to your computer and use it in GitHub Desktop.
Save mwanji/3844608 to your computer and use it in GitHub Desktop.
A successful Tent access token request to tent.is
POST https://javaapiclient.tent.is/tent/apps/evo05h/authorizations
Accept:application/vnd.tent.v0+json
Content-Type:application/vnd.tent.v0+json
{
"code": "a337d62419901973edeb182234a27739",
"token_type": "mac"
}
Had I included an Authorization header, here's what the normalized request would have been:
1349520353
7nn6b50q
POST
/apps/evo05h/authorizations
javaapiclient.tent.is
443
end normalized request
Signed with 62bf810fabddca68561f4c34f6658504
And the header itself:
MAC id="a:f857aca5", ts="1349520353", nonce="7nn6b50q", mac="ULRgMCTtCQJb3+IyTzCtgiobDjt0AbjsEkpYNbqVv7M="
If I do include the header, it fails as invalid. I can, however create Posts using the same signing function: https://javaapiclient.tent.is/posts/lr4bzx (the mention is in the metadata and is listed in my mentions, even though my name is not hyperlinked).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment