Exemplo n.º 1
0
#!/usr/bin/python

from oneid import OneID
import sys
import urllib
try:
    import json
except ImportError:
    import simplejson as json

print """Content-Type: text/html
"""

authn = OneID()

authn.set_credentials()

line = sys.stdin.readline()

resp = authn.validate(line)

sessionid = authn.save_session(resp)

print authn.redirect('account.py', resp, sessionid)

Exemplo n.º 2
0
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#

from oneid import OneID
import sys
import urllib
try:
    import json
except ImportError:
    import simplejson as json

print """Content-Type: text/html
"""

authn = OneID()

authn.set_credentials()

line = sys.stdin.readline()

resp = authn.validate(line)

sessionid = authn.save_session(resp)

print authn.redirect('http://garage.bluepopcorn.net/operate.py', resp, sessionid)