예제 #1
0
 def login( email, password, oid_username, oid_password ):
    return session.do_login( cls.config, email, password, oid_username, oid_password )
예제 #2
0
            signing_privkey_pem = fd.read()
            fd.close()

        if config["syndicate_user_verifying_key"] != None:
            fd = open(config["syndicate_user_verifying_key"], "r")
            verifying_pubkey_pem = fd.read()
            fd.close()

        if config["syndicate_volume_metadata_pubkey"] != None:
            fd = open(config["syndicate_volume_metadata_pubkey"], "r")
            volume_pubkey_pem = fd.read()
            fd.close()

        session.do_login(
            config,
            config["mail_addr"],
            config["mail_password"],
            config["syndicate_user_id"],
            config["syndicate_password"],
            user_signing_privkey_pem=signing_privkey_pem,
            user_verifying_pubkey_pem=verifying_pubkey_pem,
            volume_pubkey_pem=volume_pubkey_pem,
            create_on_absent=True,
        )

    API.setup(config)
    json_server = jsonrpc.Server(API)

    # start serving
    app.run(host="localhost", port=33333, debug=config["debug"])