Merge pull request #73 from pabluk/fix-get_issuer
Fix #72 get_issuer() returns a wrong value.
This commit is contained in:
commit
660b9c6ea1
2 changed files with 14 additions and 1 deletions
|
@ -21,7 +21,7 @@ def get_issuer():
|
|||
"""
|
||||
site_url = settings.get('SITE_URL')
|
||||
path = reverse('oidc_provider:provider_info') \
|
||||
.split('/.well-known/openid-configuration/')[0]
|
||||
.split('/.well-known/openid-configuration')[0]
|
||||
issuer = site_url + path
|
||||
|
||||
return issuer
|
||||
|
|
13
oidc_provider/tests/test_utils.py
Normal file
13
oidc_provider/tests/test_utils.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
from django.conf import settings
|
||||
from django.test import TestCase
|
||||
|
||||
from oidc_provider.lib.utils.common import get_issuer
|
||||
|
||||
|
||||
class CommonTest(TestCase):
|
||||
"""
|
||||
Test cases for common utils.
|
||||
"""
|
||||
def test_get_issuer(self):
|
||||
issuer = get_issuer()
|
||||
self.assertEqual(issuer, settings.SITE_URL + '/openid')
|
Loading…
Reference in a new issue