Ejemplo n.º 1
0
def get_soledad_info(config, tempdir):
    # get login and get user info
    user = User(config)
    api = Api(config, verify=False)
    auth = user.login(api)
    # get soledad server url
    soledad_hosts = api.get('config/soledad-service.json')['hosts']
    host = soledad_hosts.keys()[0]
    server_url = 'https://%s:%d/user-%s' % \
          (soledad_hosts[host]['hostname'], soledad_hosts[host]['port'],
                  auth['id'])
    # get provider ca certificate
    #ca_cert = requests.get('https://127.0.0.1/ca.crt', verify=False).text
    #cert_file = os.path.join(tempdir, 'ca.crt')
    cert_file = None  # not used for now
    #with open(cert_file, 'w') as f:
    #  f.write(ca_cert)
    return auth['id'], server_url, cert_file, auth['token']
Ejemplo n.º 2
0
def get_soledad_info(config, tempdir):
    # get login and get user info
    user = User(config)
    api = Api(config, verify=False)
    auth = user.login(api)
    # get soledad server url
    soledad_hosts = api.get('config/soledad-service.json')['hosts']
    host = soledad_hosts.keys()[0]
    server_url = 'https://%s:%d/user-%s' % \
          (soledad_hosts[host]['hostname'], soledad_hosts[host]['port'],
                  auth['id'])
    # get provider ca certificate
    #ca_cert = requests.get('https://127.0.0.1/ca.crt', verify=False).text
    #cert_file = os.path.join(tempdir, 'ca.crt')
    cert_file = None  # not used for now
    #with open(cert_file, 'w') as f:
    #  f.write(ca_cert)
    return auth['id'], server_url, cert_file, auth['token']
Ejemplo n.º 3
0
def signup_successfully():
    config = Config()
    user = User()
    api = Api(config, verify=False)
    user.signup(api)
    user.login(api)
Ejemplo n.º 4
0
def signup_successfully():
    config = Config()
    user = User()
    api = Api(config, verify=False)
    user.signup(api)
    user.login(api)
Ejemplo n.º 5
0
def login_successfully():
    config = Config()
    user = User(config)
    api = Api(config, verify=False)
    user.login(api)