-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from praw-dev/revoke_token
api/v1/revoke_token HTTP status code change
- Loading branch information
Showing
11 changed files
with
726 additions
and
701 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
342 changes: 172 additions & 170 deletions
342
tests/cassettes/Authorizer_revoke__access_token_with_refresh_set.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,173 +1,175 @@ | ||
{ | ||
"version": 1, | ||
"interactions": [ | ||
{ | ||
"request": { | ||
"method": "POST", | ||
"uri": "https://www.reddit.com/api/v1/access_token", | ||
"body": [ | ||
[ | ||
"grant_type", | ||
"refresh_token" | ||
], | ||
[ | ||
"refresh_token", | ||
"fake_refresh_token" | ||
] | ||
], | ||
"headers": { | ||
"User-Agent": [ | ||
"asyncprawcore:test (by /u/bboe) asyncprawcore/1.4.0" | ||
], | ||
"Connection": [ | ||
"close" | ||
], | ||
"AUTHORIZATION": [ | ||
"Basic <placeholder_auth>" | ||
] | ||
} | ||
}, | ||
"response": { | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
}, | ||
"headers": { | ||
"Connection": "close", | ||
"Content-Length": "123", | ||
"Content-Type": "application/json; charset=UTF-8", | ||
"x-frame-options": "SAMEORIGIN", | ||
"x-content-type-options": "nosniff", | ||
"x-xss-protection": "1; mode=block", | ||
"cache-control": "max-age=0, must-revalidate", | ||
"X-Moose": "majestic", | ||
"Accept-Ranges": "bytes", | ||
"Date": "Tue, 09 Jun 2020 19:42:04 GMT", | ||
"Via": "1.1 varnish", | ||
"X-Served-By": "cache-ams21041-AMS", | ||
"X-Cache": "MISS", | ||
"X-Cache-Hits": "0", | ||
"X-Timer": "S1591731724.229239,VS0,VE149", | ||
"Set-Cookie": "edgebucket=0tANW8Hs3dLcJMhGvb; Domain=reddit.com; Max-Age=63071999; Path=/; secure", | ||
"Strict-Transport-Security": "max-age=15552000; includeSubDomains; preload", | ||
"Server": "snooserv" | ||
}, | ||
"body": { | ||
"string": "{\"access_token\": \"fake_access_Token\", \"token_type\": \"bearer\", \"expires_in\": 3600, \"scope\": \"submit\"}" | ||
}, | ||
"url": "https://www.reddit.com/api/v1/access_token" | ||
} | ||
"interactions": [ | ||
{ | ||
"request": { | ||
"body": [ | ||
[ | ||
"grant_type", | ||
"refresh_token" | ||
], | ||
[ | ||
"refresh_token", | ||
"<REFRESH_TOKEN>" | ||
] | ||
], | ||
"headers": { | ||
"AUTHORIZATION": [ | ||
"Basic <BASIC_AUTH>" | ||
], | ||
"Connection": [ | ||
"close" | ||
], | ||
"User-Agent": [ | ||
"asyncprawcore:test (by /u/Lil_SpazJoekp) asyncprawcore/2.1.1.dev0" | ||
] | ||
}, | ||
{ | ||
"request": { | ||
"method": "POST", | ||
"uri": "https://www.reddit.com/api/v1/revoke_token", | ||
"body": [ | ||
[ | ||
"token", | ||
"fake_refresh_token" | ||
], | ||
[ | ||
"token_type_hint", | ||
"access_token" | ||
] | ||
], | ||
"headers": { | ||
"User-Agent": [ | ||
"asyncprawcore:test (by /u/bboe) asyncprawcore/1.4.0" | ||
], | ||
"Connection": [ | ||
"close" | ||
], | ||
"AUTHORIZATION": [ | ||
"Basic <placeholder_auth>" | ||
] | ||
} | ||
}, | ||
"response": { | ||
"status": { | ||
"code": 204, | ||
"message": "No Content" | ||
}, | ||
"headers": { | ||
"Connection": "close", | ||
"Content-Type": "application/json; charset=UTF-8", | ||
"x-frame-options": "SAMEORIGIN", | ||
"x-content-type-options": "nosniff", | ||
"x-xss-protection": "1; mode=block", | ||
"cache-control": "max-age=0, must-revalidate", | ||
"X-Moose": "majestic", | ||
"Accept-Ranges": "bytes", | ||
"Date": "Tue, 09 Jun 2020 19:42:04 GMT", | ||
"Via": "1.1 varnish", | ||
"X-Served-By": "cache-ams21036-AMS", | ||
"X-Cache": "MISS", | ||
"X-Cache-Hits": "0", | ||
"X-Timer": "S1591731724.449686,VS0,VE138", | ||
"Strict-Transport-Security": "max-age=15552000; includeSubDomains; preload", | ||
"Server": "snooserv" | ||
}, | ||
"body": { | ||
"string": "" | ||
}, | ||
"url": "https://www.reddit.com/api/v1/revoke_token" | ||
} | ||
"method": "POST", | ||
"uri": "https://www.reddit.com/api/v1/access_token" | ||
}, | ||
"response": { | ||
"body": { | ||
"string": "{\"access_token\": \"<ACCESS_TOKEN>\", \"token_type\": \"bearer\", \"expires_in\": 3600, \"refresh_token\": \"<REFRESH_TOKEN>\", \"scope\": \"*\"}" | ||
}, | ||
{ | ||
"request": { | ||
"method": "POST", | ||
"uri": "https://www.reddit.com/api/v1/access_token", | ||
"body": [ | ||
[ | ||
"grant_type", | ||
"refresh_token" | ||
], | ||
[ | ||
"refresh_token", | ||
"fake_refresh_token" | ||
] | ||
], | ||
"headers": { | ||
"User-Agent": [ | ||
"asyncprawcore:test (by /u/bboe) asyncprawcore/1.4.0" | ||
], | ||
"Connection": [ | ||
"close" | ||
], | ||
"AUTHORIZATION": [ | ||
"Basic <placeholder_auth>" | ||
] | ||
} | ||
}, | ||
"response": { | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
}, | ||
"headers": { | ||
"Connection": "close", | ||
"Content-Length": "123", | ||
"Content-Type": "application/json; charset=UTF-8", | ||
"x-frame-options": "SAMEORIGIN", | ||
"x-content-type-options": "nosniff", | ||
"x-xss-protection": "1; mode=block", | ||
"cache-control": "max-age=0, must-revalidate", | ||
"X-Moose": "majestic", | ||
"Accept-Ranges": "bytes", | ||
"Date": "Tue, 09 Jun 2020 19:42:04 GMT", | ||
"Via": "1.1 varnish", | ||
"X-Served-By": "cache-ams21020-AMS", | ||
"X-Cache": "MISS", | ||
"X-Cache-Hits": "0", | ||
"X-Timer": "S1591731725.782633,VS0,VE144", | ||
"Strict-Transport-Security": "max-age=15552000; includeSubDomains; preload", | ||
"Server": "snooserv" | ||
}, | ||
"body": { | ||
"string": "{\"access_token\": \"fake_access_Token\", \"token_type\": \"bearer\", \"expires_in\": 3600, \"scope\": \"submit\"}" | ||
}, | ||
"url": "https://www.reddit.com/api/v1/access_token" | ||
} | ||
} | ||
] | ||
} | ||
"headers": { | ||
"Accept-Ranges": "bytes", | ||
"Cache-Control": "max-age=0, must-revalidate", | ||
"Connection": "close", | ||
"Content-Length": "185", | ||
"Content-Type": "application/json; charset=UTF-8", | ||
"Date": "Tue, 15 Jun 2021 04:25:30 GMT", | ||
"Server": "snooserv", | ||
"Set-Cookie": "edgebucket=ANcTGyd6MsX0czw0kK; Domain=reddit.com; Max-Age=63071999; Path=/; secure", | ||
"Strict-Transport-Security": "max-age=15552000; includeSubDomains; preload", | ||
"Via": "1.1 varnish", | ||
"X-Clacks-Overhead": "GNU Terry Pratchett", | ||
"X-Moose": "majestic", | ||
"x-content-type-options": "nosniff", | ||
"x-frame-options": "SAMEORIGIN", | ||
"x-ratelimit-remaining": "190", | ||
"x-ratelimit-reset": "270", | ||
"x-ratelimit-used": "110", | ||
"x-xss-protection": "1; mode=block" | ||
}, | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
}, | ||
"url": "https://www.reddit.com/api/v1/access_token" | ||
} | ||
}, | ||
{ | ||
"request": { | ||
"body": [ | ||
[ | ||
"token", | ||
"dummy token" | ||
], | ||
[ | ||
"token_type_hint", | ||
"access_token" | ||
] | ||
], | ||
"headers": { | ||
"AUTHORIZATION": [ | ||
"Basic <BASIC_AUTH>" | ||
], | ||
"Connection": [ | ||
"close" | ||
], | ||
"User-Agent": [ | ||
"asyncprawcore:test (by /u/Lil_SpazJoekp) asyncprawcore/2.1.1.dev0" | ||
] | ||
}, | ||
"method": "POST", | ||
"uri": "https://www.reddit.com/api/v1/revoke_token" | ||
}, | ||
"response": { | ||
"body": { | ||
"string": "" | ||
}, | ||
"headers": { | ||
"Accept-Ranges": "bytes", | ||
"Cache-Control": "max-age=0, must-revalidate", | ||
"Connection": "close", | ||
"Content-Length": "0", | ||
"Content-Type": "application/json; charset=UTF-8", | ||
"Date": "Tue, 15 Jun 2021 04:25:30 GMT", | ||
"Server": "snooserv", | ||
"Strict-Transport-Security": "max-age=15552000; includeSubDomains; preload", | ||
"Via": "1.1 varnish", | ||
"X-Clacks-Overhead": "GNU Terry Pratchett", | ||
"X-Moose": "majestic", | ||
"x-content-type-options": "nosniff", | ||
"x-frame-options": "SAMEORIGIN", | ||
"x-ratelimit-remaining": "188", | ||
"x-ratelimit-reset": "270", | ||
"x-ratelimit-used": "112", | ||
"x-xss-protection": "1; mode=block" | ||
}, | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
}, | ||
"url": "https://www.reddit.com/api/v1/revoke_token" | ||
} | ||
}, | ||
{ | ||
"request": { | ||
"body": [ | ||
[ | ||
"grant_type", | ||
"refresh_token" | ||
], | ||
[ | ||
"refresh_token", | ||
"<REFRESH_TOKEN>" | ||
] | ||
], | ||
"headers": { | ||
"AUTHORIZATION": [ | ||
"Basic <BASIC_AUTH>" | ||
], | ||
"Connection": [ | ||
"close" | ||
], | ||
"User-Agent": [ | ||
"asyncprawcore:test (by /u/Lil_SpazJoekp) asyncprawcore/2.1.1.dev0" | ||
] | ||
}, | ||
"method": "POST", | ||
"uri": "https://www.reddit.com/api/v1/access_token" | ||
}, | ||
"response": { | ||
"body": { | ||
"string": "{\"access_token\": \"<ACCESS_TOKEN>\", \"token_type\": \"bearer\", \"expires_in\": 3600, \"refresh_token\": \"<REFRESH_TOKEN>\", \"scope\": \"*\"}" | ||
}, | ||
"headers": { | ||
"Accept-Ranges": "bytes", | ||
"Cache-Control": "max-age=0, must-revalidate", | ||
"Connection": "close", | ||
"Content-Length": "185", | ||
"Content-Type": "application/json; charset=UTF-8", | ||
"Date": "Tue, 15 Jun 2021 04:25:30 GMT", | ||
"Server": "snooserv", | ||
"Strict-Transport-Security": "max-age=15552000; includeSubDomains; preload", | ||
"Via": "1.1 varnish", | ||
"X-Clacks-Overhead": "GNU Terry Pratchett", | ||
"X-Moose": "majestic", | ||
"x-content-type-options": "nosniff", | ||
"x-frame-options": "SAMEORIGIN", | ||
"x-ratelimit-remaining": "187", | ||
"x-ratelimit-reset": "270", | ||
"x-ratelimit-used": "113", | ||
"x-xss-protection": "1; mode=block" | ||
}, | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
}, | ||
"url": "https://www.reddit.com/api/v1/access_token" | ||
} | ||
} | ||
], | ||
"recorded_at": "2021-06-14T23:25:30", | ||
"version": 1 | ||
} |
Oops, something went wrong.