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

Authentication and https #1

Merged
merged 1 commit into from
Jan 9, 2016

Conversation

johnandersen777
Copy link

I added some access control.

nigit has authorization middleware which allows you to call an executable
to approve requests. The Authorization http header gets passed as the AUTH
env variable.

./nigit --auth ./auth.py ./echo.sh

Example auth.sh

#!/bin/bash
echo $AUTH
exit $AUTH

If it exits non-zero then the client with receive a http.Unauthorized and the
stdout of auth.sh will be printed to nigit stdout.

curl -H "Authorization: 1" http://localhost:8000/echo?say=hi

Output: {"Error":"Unauthorized"}

curl -H "Authorization: 0" http://localhost:8000/echo?say=hi

Output: hi

Signed-off-by: John Andersen [email protected]

Signed-off-by: John Andersen <[email protected]>
lukasmartinelli added a commit that referenced this pull request Jan 9, 2016
Authentication and https
@lukasmartinelli lukasmartinelli merged commit 3b813f4 into lukasmartinelli:master Jan 9, 2016
@lukasmartinelli
Copy link
Owner

Rhanks alot @pdxjohnny. I created a new release including your changes.

@johnandersen777
Copy link
Author

Sweet! Thanks man!
On Jan 9, 2016 2:46 AM, "Lukas Martinelli" [email protected] wrote:

Rhanks alot @pdxjohnny https://github.com/pdxjohnny. I created a new
release including your changes.


Reply to this email directly or view it on GitHub
#1 (comment).

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

Successfully merging this pull request may close these issues.

3 participants