Rename blender_id url to blender-id
This fixes a non-compliant to RFC 1178 exception raised by the Django implementation of Blender ID. The issue is debated here https://code.djangoproject.com/ticket/20264.
This commit is contained in:
parent
6d37046933
commit
20ca3f8ee4
@ -28,7 +28,7 @@ SECRET_KEY = ''
|
|||||||
AUTH_TOKEN_HMAC_KEY = b''
|
AUTH_TOKEN_HMAC_KEY = b''
|
||||||
|
|
||||||
# Authentication settings
|
# Authentication settings
|
||||||
BLENDER_ID_ENDPOINT = 'http://blender_id:8000/'
|
BLENDER_ID_ENDPOINT = 'http://blender-id:8000/'
|
||||||
|
|
||||||
PILLAR_SERVER_ENDPOINT = 'http://pillar:5001/api/'
|
PILLAR_SERVER_ENDPOINT = 'http://pillar:5001/api/'
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ BLENDER_ID_USER_INFO_TOKEN = '-set-in-config-local-'
|
|||||||
# 'blender-id': {
|
# 'blender-id': {
|
||||||
# 'id': 'CLOUD-OF-SNOWFLAKES-43',
|
# 'id': 'CLOUD-OF-SNOWFLAKES-43',
|
||||||
# 'secret': 'thesecret',
|
# 'secret': 'thesecret',
|
||||||
# 'base_url': 'http://blender_id:8000/'
|
# 'base_url': 'http://blender-id:8000/'
|
||||||
# }
|
# }
|
||||||
# }
|
# }
|
||||||
# OAuth providers are defined in pillar.auth.oauth
|
# OAuth providers are defined in pillar.auth.oauth
|
||||||
|
@ -24,7 +24,7 @@ OAUTH_CREDENTIALS = {
|
|||||||
'blender-id': {
|
'blender-id': {
|
||||||
'id': 'blender-id-app-id',
|
'id': 'blender-id-app-id',
|
||||||
'secret': 'blender-id–secret',
|
'secret': 'blender-id–secret',
|
||||||
'base_url': 'http://blender_id:8000/'
|
'base_url': 'http://blender-id:8000/'
|
||||||
},
|
},
|
||||||
'facebook': {
|
'facebook': {
|
||||||
'id': 'fb-app-id',
|
'id': 'fb-app-id',
|
||||||
|
@ -12,7 +12,7 @@ class OAuthTests(AbstractPillarTest):
|
|||||||
|
|
||||||
oauth_provider = OAuthSignIn.get_provider('blender-id')
|
oauth_provider = OAuthSignIn.get_provider('blender-id')
|
||||||
self.assertIsInstance(oauth_provider, BlenderIdSignIn)
|
self.assertIsInstance(oauth_provider, BlenderIdSignIn)
|
||||||
self.assertEqual(oauth_provider.service.base_url, 'http://blender_id:8000/api/')
|
self.assertEqual(oauth_provider.service.base_url, 'http://blender-id:8000/api/')
|
||||||
|
|
||||||
def test_provider_not_implemented(self):
|
def test_provider_not_implemented(self):
|
||||||
from pillar.auth.oauth import OAuthSignIn, ProviderNotImplemented
|
from pillar.auth.oauth import OAuthSignIn, ProviderNotImplemented
|
||||||
@ -46,11 +46,11 @@ class OAuthTests(AbstractPillarTest):
|
|||||||
def test_provider_callback_happy(self):
|
def test_provider_callback_happy(self):
|
||||||
from pillar.auth.oauth import OAuthSignIn
|
from pillar.auth.oauth import OAuthSignIn
|
||||||
|
|
||||||
responses.add(responses.POST, 'http://blender_id:8000/oauth/token',
|
responses.add(responses.POST, 'http://blender-id:8000/oauth/token',
|
||||||
json={'access_token': 'successful-token'},
|
json={'access_token': 'successful-token'},
|
||||||
status=200)
|
status=200)
|
||||||
|
|
||||||
responses.add(responses.GET, 'http://blender_id:8000/api/user',
|
responses.add(responses.GET, 'http://blender-id:8000/api/user',
|
||||||
json={'id': '7',
|
json={'id': '7',
|
||||||
'email': 'harry@blender.org'},
|
'email': 'harry@blender.org'},
|
||||||
status=200)
|
status=200)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user