def authenticate(username, first_name, last_name, email):
    #todo take attr array
    user_dict = {'id': username,
                 'first_name': first_name,
                 'last_name': last_name or '(none)',
                 'email': email}

    auth_service = AuthService()
    user = auth_service._get_or_create_user_from_dict(
        user_dict, auth_key)

    user.backend = 'django.contrib.auth.backends.ModelBackend'

    return user
예제 #2
0
def authenticate(username, first_name, last_name, email):
    #todo take attr array
    user_dict = {
        'id': username,
        'first_name': first_name,
        'last_name': last_name or '(none)',
        'email': email
    }

    auth_service = AuthService()
    user = auth_service._get_or_create_user_from_dict(user_dict, auth_key)

    user.backend = 'django.contrib.auth.backends.ModelBackend'

    return user