# lots of js and some redirects, not yet clear what's needed to work properly
# the hcp-http below works!
[provider:hcp-web]
url_re = __https://db\.humanconnectome\.org/.*__
credential = hcp-db
authentication_type = html_form
html_form_url = https://db.humanconnectome.org/app/template/Login.vm
html_form_tagid = login_form
html_form_fields = login_method=LDAP
                   j_username={user}
                   j_password={password}
                   XNAT_CSRF=
html_form_failure_re = HTTP Status 404
html_form_success_re = Public Connectome Data

[provider:hcp-http]
url_re = https://db\.humanconnectome\.org/data/.*
credential = hcp-db
authentication_type = http_auth
http_auth_url = https://db.humanconnectome.org/data/JSESSION

[provider:hcp-xnat]
url_re = xnat://somewhereIdon'tknowyet
credential = hcp-db
authentication_type = xnat

[provider:hcp-s3]
url_re = s3://hcp-openaccess.*
credential = hcp-s3
authentication_type = aws-s3

[provider:balsa]
url_re = https?://balsa\.wustl\.edu/.*
# or could be a different custom one!  so we might allow for a choice
# https://balsa.wustl.edu/register/register
credential = hcp-db
authentication_type = html_form
# https://balsa.wustl.edu/login/auth
html_form_url = https://balsa.wustl.edu/j_spring_security_check
html_form_tagid = loginForm
html_form_fields = j_username={user}
                   j_password={password}
                   _spring_security_remember_me=
# seems to lead us to the same page with the same content...
# but with a different Location which we don't handle yet to forward us further... TODO!
#html_form_failure_re = Login to BALSA
html_form_success_re = Logged in as

[credential:hcp-db]
url = https://db.humanconnectome.org/app/template/Login.vm
type = user_password

[credential:hcp-s3]
url = https://wiki.humanconnectome.org/display/PublicData/Connecting+to+Connectome+Data+via+AWS
type = aws-s3
