[provider:crcns]
url_re = https?://crcns\.org/.*
         ftp://crcns\.org/.*
# certificates = ??? ; (uses https)
credential = crcns
# for HTTP: could be html_form (see below), user_password,
authentication_type = html_form
html_form_url = https://crcns.org/login_form
html_form_tagid = login_form
html_form_fields = __ac_name={user}
                   __ac_password={password}
                   submit=Log in
                   form.submitted=1
                   js_enabled=0
                   cookies_enabled=
html_form_failure_re = (Login failed|Please log in)
html_form_success_re = You are now logged in

# TODO: think about separating authenticator into a separate type of section,
# similar to credential. Would results in closer to code arrangement
# BENEFITS:  we might then specify multiple pairs, e.g. for :
# THINK:  what if I have few different credentials for the same portal, which
#         I use for different subsets of data (collaborations etc).
#         With separateing authenticator out we could easier reuse pairs
#         of credential_authenticator pairs!
[provider:crcns-nersc]
url_re = https://portal\.nersc\.gov/project/crcns/download/.*
credential = crcns
authentication_type = html_form
html_form_url = https://portal.nersc.gov/project/crcns/download/index.php
# Just the first/only form
# html_form_tagid = login_form
html_form_fields = username={user}
                   password={password}
                   submit=Login
                   fn=alm-1/filelist.txt
html_form_failure_re = (<form action=".*" method="post">|Error: Invalid user name or password)
#html_form_success_re = Logged in as


[credential:crcns]
# url where to request credentials
url = https://crcns.org/request-account/
# (user_password|aws-s3(access_key,secret_key for S3)
type = user_password
