Authentication support via any executable, communication via shell args. Based on work by Cliff Cyphers. https://github.com/ccyphers/websockify

This commit is contained in:
Matthew Balman 2012-09-12 16:36:59 +00:00
parent 44e5fa0b82
commit 0a2dac53bf
1 changed files with 17 additions and 0 deletions

17
auth.py Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env python
import os
try:
expected = os.environ['EXPECTED_TOKEN']
token = os.environ['WEBSOCKIFY_UNSAFE_TOKEN']
except:
exit(-1)
print 'expected = ' + expected
print 'token = ' + token
if expected == token:
exit(0)
else:
exit(1)