Add check_group_lookup_args and service_metadata to auth providers
This commit is contained in:
parent
1cfc4a8341
commit
ecfac81721
5 changed files with 71 additions and 0 deletions
|
@ -186,6 +186,18 @@ class UserAuthentication(object):
|
|||
""" Verifies that the given username and password credentials are valid. """
|
||||
return self.state.verify_credentials(username_or_email, password)
|
||||
|
||||
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 self.state.check_group_lookup_args(group_lookup_args)
|
||||
|
||||
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 self.state.service_metadata()
|
||||
|
||||
def iterate_group_members(self, group_lookup_args, page_size=None, disable_pagination=False):
|
||||
""" Returns a tuple of an iterator over all the members of the group matching the given lookup
|
||||
args dictionary, or the error that occurred if the initial call failed or is unsupported.
|
||||
|
|
Reference in a new issue