Add check_group_lookup_args and service_metadata to auth providers

This commit is contained in:
Joseph Schorr 2017-02-17 17:10:26 -05:00
parent 1cfc4a8341
commit ecfac81721
5 changed files with 71 additions and 0 deletions

View file

@ -72,6 +72,18 @@ class FederatedUsers(object):
return (db_user, None)
def service_metadata(self):
""" Returns a dictionary of extra metadata to present to *superusers* about this auth engine.
For example, LDAP returns the base DN so we can display to the user during sync setup.
"""
return {}
def check_group_lookup_args(self, group_lookup_args):
""" Verifies that the given group lookup args point to a valid group. Returns a tuple consisting
of a boolean status and an error message (if any).
"""
return (False, 'Not supported')
def iterate_group_members(self, group_lookup_args, page_size=None, disable_pagination=False):
""" Returns an iterator over all the members of the group matching the given lookup args
dictionary. The format of the lookup args dictionary is specific to the implementation.