def create_linked_authentication_service(role, service_type, unique_service_id, configuration): linked_service_controller = LinkedServiceController(role) linked_service_wrapper = linked_service_controller.create_linked_service( service_type, unique_service_id, configuration, AuthenticationServiceBase.RoleWrapperByEntityType(service_type)) return linked_service_wrapper
def select_authentication_services_for_role(role): """ Selects all the linked authentication services for a given role :param role: An instance of RoleBase of one of its subclasses :return: Collection of subclasses of LinkedServiceBase """ linked_service_controller = LinkedServiceController(role) return [ AuthenticationServiceBase.RoleWrapperByEntityType( linked_service.service_type)(linked_service) for linked_service in linked_service_controller.linked_services( type_filtes=AuthenticationServiceBase.AUTHENTICATION_SERVICE_TYPES) ]