Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Basic Authentication? #25

Open
aendra-rininsland opened this issue Aug 16, 2017 · 3 comments
Open

Add Basic Authentication? #25

aendra-rininsland opened this issue Aug 16, 2017 · 3 comments

Comments

@aendra-rininsland
Copy link

According to the docs you can provide a -username and -password flag to CoreNLP to get it to use Basic Authentication for requests. Would it be possible to support this in py-corenlp? I have a microservice architecture using CoreNLP that bridges between AWS and Heroku, so therefore can't use Security Groups and have to fall back on whatever auth CoreNLP provides.

@saikishor
Copy link

I guess we can do the same with small modification
please refer to this : http://docs.python-requests.org/en/latest/user/quickstart/#more-complicated-post-requests

@aendra-rininsland
Copy link
Author

aendra-rininsland commented May 24, 2018

Hi!

I don't think any access is provided to the StanfordCoreNLP class' headers; it's explicitly provided as "connection: close" here: https://github.com/smilli/py-corenlp/blob/master/pycorenlp/corenlp.py#L29

If that was possible, then it'd be easy to just pass an Authorization header. TBTH though, it still really would make the most sense as a some sort of configuration parameter, maybe a kwarg — one generally shouldn't have to figure out whatever authentication mechanism being used by a piece of server software when using an abstracted client SDK.

@saikishor
Copy link

Agreed!!

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

No branches or pull requests

2 participants