Skip to content

Commit

Permalink
rename the interface to ILoginProviders
Browse files Browse the repository at this point in the history
  • Loading branch information
erral committed Jan 12, 2025
1 parent 3468580 commit a57b3ac
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/plone/restapi/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def __call__(self, block):
"""Return an iterable of sub-blocks found inside `block`."""


class IExternalLoginProviders(Interface):
class ILoginProviders(Interface):
"""An interface needed to be implemented by providers that want to be listed
in the @login endpoint
"""
Expand Down
4 changes: 2 additions & 2 deletions src/plone/restapi/services/auth/get.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# -*- coding: utf-8 -*-
from plone.restapi.interfaces import IExternalLoginProviders
from plone.restapi.interfaces import ILoginProviders
from plone.restapi.services import Service
from zope.component import getAdapters


class Login(Service):
def reply(self):
adapters = getAdapters((self.context,), IExternalLoginProviders)
adapters = getAdapters((self.context,), ILoginProviders)
external_providers = []
for name, adapter in adapters:
external_providers.extend(adapter.get_providers())
Expand Down
4 changes: 2 additions & 2 deletions src/plone/restapi/tests/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from zope.event import notify
from ZPublisher.pubevents import PubStart
from zope.component import provideAdapter
from plone.restapi.interfaces import IExternalLoginProviders
from plone.restapi.interfaces import ILoginProviders
from Products.CMFPlone.interfaces import IPloneSiteRoot


Expand Down Expand Up @@ -244,7 +244,7 @@ def setUp(self):
provideAdapter(
MyExternalLinks,
adapts=(IPloneSiteRoot,),
provides=IExternalLoginProviders,
provides=ILoginProviders,
name="test-external-links",
)

Expand Down
4 changes: 2 additions & 2 deletions src/plone/restapi/tests/test_documentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
from plone.app.testing import pushGlobalRegistry
from plone.restapi.testing import register_static_uuid_utility
from zope.component import provideAdapter
from plone.restapi.interfaces import IExternalLoginProviders
from plone.restapi.interfaces import ILoginProviders
from Products.CMFPlone.interfaces import IPloneSiteRoot


Expand Down Expand Up @@ -255,7 +255,7 @@ def setUp(self):
provideAdapter(
MyExternalLinks,
adapts=(IPloneSiteRoot,),
provides=IExternalLoginProviders,
provides=ILoginProviders,
name="test-external-links",
)

Expand Down

0 comments on commit a57b3ac

Please sign in to comment.