"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/identity/core.py" between
keystone-17.0.0.tar.gz and keystone-18.0.0.tar.gz

About: OpenStack Keystone (Core Service: Identity) provides an authentication and authorization service for other OpenStack services. Provides a catalog of endpoints for all OpenStack services.
The "Victoria" series (latest release).

core.py  (keystone-17.0.0):core.py  (keystone-18.0.0)
skipping to change at line 1511 skipping to change at line 1511
user_dict = ( user_dict = (
PROVIDERS.shadow_users_api.create_federated_user( PROVIDERS.shadow_users_api.create_federated_user(
idp['domain_id'], federated_dict, email=email idp['domain_id'], federated_dict, email=email
) )
) )
PROVIDERS.shadow_users_api.set_last_active_at(user_dict['id']) PROVIDERS.shadow_users_api.set_last_active_at(user_dict['id'])
return user_dict return user_dict
def shadow_federated_user(self, idp_id, protocol_id, unique_id, def shadow_federated_user(self, idp_id, protocol_id, unique_id,
display_name, email=None, group_ids=None): display_name, email=None, group_ids=None):
"""Map a federated user to a user. """Map a federated user to a user.
:param idp_id: identity provider id :param idp_id: identity provider id
:param protocol_id: protocol id :param protocol_id: protocol id
:param unique_id: unique id for the user within the IdP :param unique_id: unique id for the user within the IdP
:param display_name: user's display name :param display_name: user's display name
:param email: user's email :param email: user's email
:param group_ids: list of group ids to add the user to :param group_ids: list of group ids to add the user to
:returns: dictionary of the mapped User entity :returns: dictionary of the mapped User entity
""" """
user_dict = self._shadow_federated_user( user_dict = self._shadow_federated_user(
idp_id, protocol_id, unique_id, display_name, email) idp_id, protocol_id, unique_id, display_name, email)
# Note(knikolla): The shadowing operation can be cached, # Note(knikolla): The shadowing operation can be cached,
# however we need to update the expiring group memberships. # however we need to update the expiring group memberships.
if group_ids: if group_ids:
for group_id in group_ids: for group_id in group_ids:
PROVIDERS.shadow_users_api.add_user_to_group_expires( PROVIDERS.shadow_users_api.add_user_to_group_expires(
user_dict['id'], group_id) user_dict['id'], group_id)
return user_dict return user_dict
class MappingManager(manager.Manager): class MappingManager(manager.Manager):
"""Default pivot point for the ID Mapping backend.""" """Default pivot point for the ID Mapping backend."""
driver_namespace = 'keystone.identity.id_mapping' driver_namespace = 'keystone.identity.id_mapping'
_provides_api = 'id_mapping_api' _provides_api = 'id_mapping_api'
def __init__(self): def __init__(self):
super(MappingManager, self).__init__(CONF.identity_mapping.driver) super(MappingManager, self).__init__(CONF.identity_mapping.driver)
 End of changes. 2 change blocks. 
19 lines changed or deleted 19 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)