def convertb2access(ui):
    """function to convert user information returned by b2access service

    returns this format:
    e.g.:{'name':'John Smith','id': '12345', 'email': 'js@example.com','provider':'b2access'}
    """
    myui = {'name':ui['name'],'id':ui['sub'],'email':ui['email'],'provider':'b2access'}
    return myui