diff --git a/ietf/api/tests.py b/ietf/api/tests.py index 856e79a18..c8a64e48d 100644 --- a/ietf/api/tests.py +++ b/ietf/api/tests.py @@ -354,8 +354,8 @@ class CustomApiTests(TestCase): self.assertEqual(data['version'], ietf.__version__+ietf.__patch__) self.assertIn(data['date'], ietf.__date__) - def test_api_appauth_authortools(self): - url = urlreverse('ietf.api.views.author_tools') + def test_api_appauth(self): + url = urlreverse('ietf.api.views.app_auth') person = PersonFactory() apikey = PersonalApiKey.objects.create(endpoint=url, person=person) diff --git a/ietf/api/urls.py b/ietf/api/urls.py index 887558a3e..ee1779a09 100644 --- a/ietf/api/urls.py +++ b/ietf/api/urls.py @@ -40,8 +40,8 @@ urlpatterns = [ url(r'^submit/?$', submit_views.api_submit), # Datatracker version url(r'^version/?$', api_views.version), - # Authtools API key - url(r'^appauth/authortools', api_views.author_tools), + # Application authentication API key + url(r'^appauth/[authortools|bibxml]', api_views.app_auth), ] # Additional (standard) Tastypie endpoints diff --git a/ietf/api/views.py b/ietf/api/views.py index d24ae11cc..2d5176700 100644 --- a/ietf/api/views.py +++ b/ietf/api/views.py @@ -218,7 +218,7 @@ def version(request): @require_api_key @csrf_exempt -def author_tools(request): +def app_auth(request): return HttpResponse( json.dumps({'success': True}), content_type='application/json') diff --git a/ietf/ietfauth/tests.py b/ietf/ietfauth/tests.py index 4436f2c6d..53524b786 100644 --- a/ietf/ietfauth/tests.py +++ b/ietf/ietfauth/tests.py @@ -655,7 +655,7 @@ class IetfAuthTests(TestCase): self.assertContains(r, 'Invalid apikey', status_code=403) # invalid apikey (invalidated api key) - unauthorized_url = urlreverse('ietf.api.views.author_tools') + unauthorized_url = urlreverse('ietf.api.views.app_auth') invalidated_apikey = PersonalApiKey.objects.create( endpoint=unauthorized_url, person=person, valid=False) r = self.client.post(unauthorized_url, {'apikey': invalidated_apikey.hash()}) diff --git a/ietf/person/models.py b/ietf/person/models.py index 381fee968..2b2b337e7 100644 --- a/ietf/person/models.py +++ b/ietf/person/models.py @@ -357,6 +357,7 @@ PERSON_API_KEY_VALUES = [ ("/api/notify/meeting/registration", "/api/notify/meeting/registration", "Robot"), ("/api/notify/meeting/bluesheet", "/api/notify/meeting/bluesheet", "Recording Manager"), ("/api/appauth/authortools", "/api/appauth/authortools", None), + ("/api/appauth/bibxml", "/api/appauth/bibxml", None), ] PERSON_API_KEY_ENDPOINTS = sorted(list(set([ (v, n) for (v, n, r) in PERSON_API_KEY_VALUES ])))