You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2022/09/14 18:22:25 UTC
[allura] 07/07: [#8461] include oauth_callback in our example clients, to match spec
This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a commit to branch db/8461
in repository https://gitbox.apache.org/repos/asf/allura.git
commit ae26886d459e9ed63772dcf48991e22e168babff
Author: Dave Brondsema <db...@slashdotmedia.com>
AuthorDate: Tue Sep 13 18:25:42 2022 -0400
[#8461] include oauth_callback in our example clients, to match spec
---
Allura/docs/api-rest/docs.md | 2 +-
scripts/wiki-copy.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Allura/docs/api-rest/docs.md b/Allura/docs/api-rest/docs.md
index 425ae8912..886514719 100755
--- a/Allura/docs/api-rest/docs.md
+++ b/Allura/docs/api-rest/docs.md
@@ -93,7 +93,7 @@ If you want your application to be able to use the API on behalf of another user
AUTHORIZE_URL = 'https://forge-allura.apache.org/rest/oauth/authorize'
ACCESS_TOKEN_URL = 'https://forge-allura.apache.org/rest/oauth/access_token'
- oauth = OAuth1Session(CONSUMER_KEY, client_secret=CONSUMER_SECRET)
+ oauth = OAuth1Session(CONSUMER_KEY, client_secret=CONSUMER_SECRET, callback_uri='oob')
# Step 1: Get a request token. This is a temporary token that is used for
# having the user authorize an access token and to sign the request to obtain
diff --git a/scripts/wiki-copy.py b/scripts/wiki-copy.py
index fc6553761..ddb3187d3 100644
--- a/scripts/wiki-copy.py
+++ b/scripts/wiki-copy.py
@@ -81,7 +81,7 @@ def make_oauth_client(base_url) -> requests.Session:
oauth_token = cp.get(base_url, 'oauth_token')
oauth_token_secret = cp.get(base_url, 'oauth_token_secret')
except NoOptionError:
- oauthSess = OAuth1Session(oauth_key, client_secret=oauth_secret)
+ oauthSess = OAuth1Session(oauth_key, client_secret=oauth_secret, callback_uri='oob')
request_token = oauthSess.fetch_request_token(REQUEST_TOKEN_URL)
pin_url = oauthSess.authorization_url(AUTHORIZE_URL, request_token['oauth_token'])
if isinstance(webbrowser.get(), webbrowser.GenericBrowser):