Beispiel #1
0
def activate_custom_domain():

    device_username = request.form['device_username'].lower()
    device_password = request.form['device_password']

    validator = InternalValidator()
    validator.validate(device_username, device_password)

    internal.activate_custom_domain(
        request.form['full_domain'],
        device_username,
        device_password,
    )
    return identification()
Beispiel #2
0
def activate():

    device_username = request.form['device_username']
    device_password = request.form['device_password']

    validator = InternalValidator()
    validator.validate(device_username, device_password)

    main_domain = get_main_domain(request.form)

    internal.activate(request.form['redirect_email'],
                      request.form['redirect_password'],
                      request.form['user_domain'], device_username,
                      device_password, main_domain)
    return identification()
Beispiel #3
0
def activate():

    device_username = request.form['device_username'].lower()
    device_password = request.form['device_password']

    validator = InternalValidator()
    validator.validate(device_username, device_password)

    main_domain = 'syncloud.it'
    if 'main_domain' in request.form:
        main_domain = request.form['main_domain']

    internal.activate(request.form['redirect_email'],
                      request.form['redirect_password'],
                      request.form['user_domain'], device_username,
                      device_password, main_domain)
    return identification()
def test_validate_short_credentials():
    validator = InternalValidator()
    with pytest.raises(PassthroughJsonError):
        validator.validate('u', 'p')
def test_validate_good_credentials():
    validator = InternalValidator()
    validator.validate('username', 'password123')