I have the following code which works as is.
What I need to set the HTTPS authentication
in the header.
To keep the question clean, just accept the fact that the python requests
module can’t be used because of what the vendor did to wrap the Jython runtime.
The Java Classes are at Java 8.
def getAllSafes (self, authenticationBaseURL, sessionToken):
wwJO = Json.createObjectBuilder().build()
offset = 0
limit = 10
sort = "asc" # ascending
includeAccounts = "true"
extendedDetails = "true"
get_allSafes_url = "https://" + authenticationBaseURL + "/PasswordVault/api/Safes?" + "includeAccounts=" + includeAccounts + "&offset=" + str(offset) + "&limit=" + str(limit) + "&sort=" + sort + "&extendedDetails=" + extendedDetails
wwJO = Json.createObjectBuilder().build()
vault_url = URL(get_allSafes_url)
isr = InputStreamReader(vault_url.openStream())
JsonReader = Json.createReader(isr)
print JsonReader.readObject()
JsonReader.close()
return "_Determined at run time_"