Skip to content
This repository was archived by the owner on Dec 27, 2018. It is now read-only.

SPIKE: Investigate Other Means of Authentication (NTLM?) #12

Open
rpcope1 opened this issue Nov 11, 2015 · 1 comment
Open

SPIKE: Investigate Other Means of Authentication (NTLM?) #12

rpcope1 opened this issue Nov 11, 2015 · 1 comment

Comments

@rpcope1
Copy link
Owner

rpcope1 commented Nov 11, 2015

@yixiyangh, per your request on another issue thread, I'll see what can be done about other means of authentication. I'm opening this ticket to track my investigation.

@yangyixizg
Copy link

I tested your API on my localhost with Confluence 5.8, but unfortunately, the real one on the server is still Confluence 5.1. Thus, I have to use prototype REST API, which is limited only for method 'GET'. Furthermore, I have to set the environment variable 'CURL_CA_BUNDLE = my_cert.crt' for NTLM authentication. Currently, I am able to access Confluence 5.1 using prototype REST API via following packages:

Here is my example:

user = "domain\\username"
password = "password"
session = requests.Session()
session.auth = HttpNtlmAuth(user, password)
response = session.get("https://host:port/rest/prototype/1/content/{content_id}.json")
response.raise_for_status()
response=json.loads(response.text)
print "Response:\n"+json.dumps(response, sort_keys=True, indent=4, separators=(',', ': '))

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants