Expand description
OAuth 1.0a three-legged sign-in for SmugMug, used to obtain an access token pair from just the API key and secret. Uses the out-of-band (“oob”) callback: the user approves access in a browser and SmugMug shows a 6-digit verifier code to type back into the CLI.
Structs§
- OAuth
Endpoints - Endpoints for the sign-in flow; overridable so tests can point at a mock server.
- Token
Pair - A token/secret pair returned by one of the OAuth token endpoints.
Functions§
- authorize_
url - Step 2: the URL where the user approves access. Full access with modify permission is needed for uploads and deletes.
- get_
access_ token - Step 3: exchange the request token plus the verifier code the user was shown for a long-lived access token.
- get_
request_ token - Step 1: get a temporary request token, signed with only the API key and secret.