Skip to content
This repository was archived by the owner on Mar 15, 2018. It is now read-only.

Commit 40f6c09

Browse files
author
Andy McKay
committed
add in oauth keys (bug 858813)
1 parent 5893e17 commit 40f6c09

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

lib/pay_server/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import logging
66
import urllib
77

8+
from django.conf import settings
9+
810
from curling.lib import API
911
from django_statsd.clients import statsd
1012
import requests
@@ -86,6 +88,8 @@ class Client(object):
8688
def __init__(self, config=None):
8789
self.config = self.parse(config)
8890
self.api = API(config['server'])
91+
self.api.activate_oauth(settings.SOLITUDE_OAUTH.get('key'),
92+
settings.SOLITUDE_OAUTH.get('secret'))
8993
self.encoder = None
9094
self.filter_encoder = urllib.urlencode
9195

lib/settings_base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,6 +1486,9 @@ def read_only_mode(env):
14861486
# The timeout we'll give solitude.
14871487
SOLITUDE_TIMEOUT = 10
14881488

1489+
# The OAuth keys to connect to the solitude host specified above.
1490+
SOLITUDE_OAUTH = {'key': '', 'secret': ''}
1491+
14891492
# Temporary flag to work with navigator.mozPay() on devices that don't
14901493
# support it natively.
14911494
SIMULATE_NAV_PAY = False

sites/dev/settings_mkt.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@
111111
INAPP_KEY_PATHS = private_mkt.INAPP_KEY_PATHS
112112

113113
SOLITUDE_HOSTS = ('https://payments-dev.allizom.org',)
114+
SOLITUDE_OAUTH = {'key': private.SOLITUDE_OAUTH_KEY,
115+
'secret': private.SOLITUDE_OAUTH_SECRET}
114116

115117
PAYPAL_LIMIT_PREAPPROVAL = False
116118

0 commit comments

Comments
 (0)