OAuth2 RP and AS example done. Fixed a couple of missing things in the OAuth2 consumer/provider code.

This commit is contained in:
Roland Hedberg 2013-12-09 14:51:55 +01:00
parent d920134e4f
commit 0bb81bc4da
31 changed files with 782 additions and 1192 deletions

View File

@ -0,0 +1 @@
# A basic example of a OAuth2 Authorization Server

258
oauth_example/as/as.py Normal file
View File

@ -0,0 +1,258 @@
#!/usr/bin/env python
"""
A very simple OAuth2 AS
"""
import logging
import re
import sys
import traceback
from authn_setup import authn_setup
from oic.oauth2.provider import Provider
from oic.oauth2.provider import AuthorizationEndpoint
from oic.oauth2.provider import TokenEndpoint
from oic.utils.authn.client import verify_client
from oic.utils.authz import Implicit
from oic.utils.http_util import wsgi_wrapper, NotFound, ServiceError
__author__ = 'roland'
# ============================================================================
# First define how logging is supposed to be done
# ============================================================================
LOGGER = logging.getLogger("")
LOGFILE_NAME = 'oauth2_as.log'
hdlr = logging.FileHandler(LOGFILE_NAME)
base_formatter = logging.Formatter(
"%(asctime)s %(name)s:%(levelname)s %(message)s")
hdlr.setFormatter(base_formatter)
LOGGER.addHandler(hdlr)
LOGGER.setLevel(logging.INFO)
# ============================================================================
# Endpoint functions
# ============================================================================
#noinspection PyUnusedLocal
def token(environ, start_response):
_oas = environ["oic.oas"]
return wsgi_wrapper(environ, start_response, _oas.token_endpoint)
#noinspection PyUnusedLocal
def authorization(environ, start_response):
_oas = environ["oic.oas"]
return wsgi_wrapper(environ, start_response, _oas.authorization_endpoint)
ENDPOINTS = [
AuthorizationEndpoint(authorization),
TokenEndpoint(token),
]
#noinspection PyUnusedLocal
def verify(environ, start_response):
_oas = environ["oic.oas"]
return wsgi_wrapper(environ, start_response, _oas.verify_endpoint)
# ---------------------------------------------------------------------------
# For static files
def static(environ, start_response, path):
LOGGER.info("[static]sending: %s" % (path,))
try:
text = open(path).read()
if path.endswith(".ico"):
start_response('200 OK', [('Content-Type', "image/x-icon")])
elif path.endswith(".html"):
start_response('200 OK', [('Content-Type', 'text/html')])
elif path.endswith(".json"):
start_response('200 OK', [('Content-Type', 'application/json')])
elif path.endswith(".txt"):
start_response('200 OK', [('Content-Type', 'text/plain')])
elif path.endswith(".css"):
start_response('200 OK', [('Content-Type', 'text/css')])
else:
start_response('200 OK', [('Content-Type', "text/xml")])
return [text]
except IOError:
resp = NotFound()
return resp(environ, start_response)
URLS = [
(r'^verify', verify),
]
for endp in ENDPOINTS:
URLS.append(("^%s" % endp.etype, endp))
# ============================================================================
# The main web server function
# ============================================================================
def application(environ, start_response):
"""
The main WSGI application. Dispatch the current request to
the functions from above and store the regular expression
captures in the WSGI environment as `oic.url_args` so that
the functions from above can access the url placeholders.
If nothing matches call the `not_found` function.
:param environ: The HTTP application environment
:param start_response: The application to run when the handling of the
request is done
:return: The response as a list of lines
"""
global OAS
#user = environ.get("REMOTE_USER", "")
path = environ.get('PATH_INFO', '').lstrip('/')
LOGGER.info("path: %s" % path)
if path == "robots.txt":
return static(environ, start_response, "static/robots.txt")
environ["oic.oas"] = OAS
if path.startswith("static/"):
return static(environ, start_response, path)
for regex, callback in URLS:
match = re.search(regex, path)
if match is not None:
try:
environ['oic.url_args'] = match.groups()[0]
except IndexError:
environ['oic.url_args'] = path
LOGGER.debug("callback: %s" % callback)
try:
return callback(environ, start_response)
except Exception, err:
print >> sys.stderr, "%s" % err
message = traceback.format_exception(*sys.exc_info())
print >> sys.stderr, message
LOGGER.exception("%s" % err)
resp = ServiceError("%s" % err)
return resp(environ, start_response)
LOGGER.debug("unknown side: %s" % path)
resp = NotFound("Couldn't find the side you asked for!")
return resp(environ, start_response)
# ============================================================================
# Below is what's needed to start the server
# ============================================================================
START_MESG = "OAuth2 server starting listening on port:%s at %s"
if __name__ == "__main__":
import argparse
import shelve
import importlib
from cherrypy import wsgiserver
from cherrypy.wsgiserver import ssl_pyopenssl
# This is where session information is stored
# This serve is stateful.
from oic.utils.sdb import SessionDB
# Parse the command arguments
parser = argparse.ArgumentParser()
parser.add_argument('-d', dest='debug', action='store_true')
parser.add_argument('-p', dest='port', default=80, type=int)
# Who it should report as being responsible for the authentication
parser.add_argument('-A', dest='authn_as', default="")
parser.add_argument('-c', dest='conf_path')
parser.add_argument(dest="config")
args = parser.parse_args()
# Client data base
cdb = shelve.open("client_db", writeback=True)
# Load the configuration file, which must be a python file
# The default; first look for it in the directory from where this program
# is run.
sys.path.insert(0, ".")
# If a specific configuration directory is specified look there first
if args.conf_path:
sys.path.insert(0, args.conf_path)
config = importlib.import_module(args.config)
# Add port number information
config.issuer = config.issuer % args.port
config.SERVICE_URL = config.SERVICE_URL % args.port
for cnf in config.AUTHN_METHOD.values():
try:
cnf["config"]["return_to"] = cnf["config"]["return_to"] % args.port
except KeyError:
pass
# Initiate the authentication broker. This is the service that
# chooses which authentication method that is to be used.
broker = authn_setup(config)
# dealing with authorization, this is just everything goes.
authz = Implicit()
# Initiate the OAuth2 provider instance
OAS = Provider(config.issuer, SessionDB(), cdb, broker, authz,
client_authn=verify_client, symkey=config.SYM_KEY)
# set some parameters
try:
OAS.cookie_ttl = config.COOKIETTL
except AttributeError:
pass
try:
OAS.cookie_name = config.COOKIENAME
except AttributeError:
pass
if args.debug:
LOGGER.setLevel(logging.DEBUG)
OAS.debug = True
if args.authn_as:
OAS.authn_as = args.authn_as
OAS.endpoints = ENDPOINTS
if args.port == 80:
OAS.baseurl = config.baseurl
else:
if config.baseurl.endswith("/"):
config.baseurl = config.baseurl[:-1]
OAS.baseurl = "%s:%d" % (config.baseurl, args.port)
if not OAS.baseurl.endswith("/"):
OAS.baseurl += "/"
LOGGER.debug("URLS: '%s" % (URLS,))
# Initiate the web server
SRV = wsgiserver.CherryPyWSGIServer(('0.0.0.0', args.port), application)
SRV.ssl_adapter = ssl_pyopenssl.pyOpenSSLAdapter(config.SERVER_CERT,
config.SERVER_KEY,
config.CERT_CHAIN)
LOGGER.info(START_MESG % (args.port, config.HOST))
print START_MESG % (args.port, config.HOST)
try:
SRV.start()
except KeyboardInterrupt:
SRV.stop()

View File

@ -0,0 +1,59 @@
from oic.utils.authn.authn_context import AuthnBroker
__author__ = 'roland'
def ldap_validation(config):
from oic.utils.authn.ldap_member import UserLDAPMemberValidation
config["args"].update(config["conf"])
return UserLDAPMemberValidation(**config["args"])
VALIDATOR = {
"LDAP": ldap_validation
}
def cas_setup(item):
from oic.utils.authn.user_cas import CasAuthnMethod
try:
v_cnf = item["validator"]
except KeyError:
_func = None
else:
_func = VALIDATOR[v_cnf["type"].upper()](item)
_cnf = item["config"]
return CasAuthnMethod(None, _cnf["cas_server"], item["URL"],
_cnf["return_to"], _func)
def userpwd_setup(item):
from oic.utils.authn.user import UsernamePasswordMako
_conf = item["config"]
return UsernamePasswordMako(None, "login.mako", _conf["lookup"],
_conf["passwd"], _conf["return_to"])
AUTH_METHOD = {
"UserPassword": userpwd_setup,
"CAS": cas_setup
}
def authn_setup(config):
broker = AuthnBroker()
# Which methods to use is defined in the configuration file
for authkey, item in config.AUTHN_METHOD.items():
try:
func = AUTH_METHOD[authkey]
except KeyError:
pass
else:
broker.add(item["ACR"], func(item), item["WEIGHT"], item["URL"])
return broker

View File

@ -0,0 +1,89 @@
# -*- coding: utf-8 -*-
from mako.lookup import TemplateLookup
HOST = "localhost"
#HOST = "lingon.ladok.umu.se"
#HOST = "lingon.catalogix.se"
baseurl = "https://%s" % HOST
issuer = "%s:%%d" % baseurl
# Where to go for verifying the authentication info
SERVICE_URL = "%s/verify" % issuer
# Where to return the user after the authentication has been completed
RETURN_TO = "%s/authorization" % issuer
# This is used to pick a subset of users from the set of users that can
# authenticate at this server
VALIDATOR = {
"type": "ldap",
"conf": {
"uri": "ldaps://ldap.umu.se",
"base": "dc=umu, dc=se",
"filter_pattern": "(uid=%s)",
"user": "",
"passwd": "",
"attr": ["eduPersonScopedAffiliation", "eduPersonAffiliation"],
},
"args": {
"verifyAttr": "eduPersonAffiliation",
"verifyAttrValid": ['employee', 'staff', 'student']
}
}
# ============================================================================
# Static password database
# The password interface is supposed to act as a dictionary. Which it in this
# case is.
# ============================================================================
PASSWD = {"diana": "krall",
"babs": "howes",
"upper": "crust",
"rohe0002": "StevieRay",
"haho0032": "qwerty"}
ROOT = './'
# ACR = Authentication Class Reference
# WEIGHT = your view on the strength of the method, higher value = better
# SERVICE_URL = After the authentication, this is where the user should be
# redirected to.
AUTHN_METHOD = {
# ..... If you want to use CAS authentication ....
#"CAS" : {
# "ACR": "CAS",
# "WEIGHT": 1,
# "URL": SERVICE_URL,
# "validator": VALIDATOR,
# "config": {
# "server": "https://cas.umu.se",
# "return_to": RETURN_TO
# }
#},
"UserPassword": {
"ACR": "PASSWORD",
"WEIGHT": 1,
"URL": SERVICE_URL,
"config": {
"lookup": TemplateLookup(directories=[ROOT + 'templates',
ROOT + 'htdocs'],
module_directory=ROOT + 'modules',
input_encoding='utf-8',
output_encoding='utf-8'),
"passwd": PASSWD,
"return_to": RETURN_TO
}
},
}
AUTHN = "Simple"
COOKIENAME = 'pyoic'
COOKIETTL = 4 * 60 # 4 hours
SYM_KEY = "IfIwerelookingfo" # 16 bytes for AES_128 which is the default
SERVER_CERT = "%s/certs/server.crt" % ROOT
SERVER_KEY = "%s/certs/server.key" % ROOT
#CERT_CHAIN="certs/chain.pem"
CERT_CHAIN = None

View File

@ -0,0 +1,2 @@
User-agent: *
Disallow: /

Binary file not shown.

View File

@ -1,707 +0,0 @@
2013-05-24 14:20:03,493 root:DEBUG URLS: '[('^verify', <function verify at 0x101801668>), ('.+\\.css$', <function css at 0x101801500>), ('safe', <function safe at 0x101801488>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x1018185d0>)]
2013-05-24 14:20:03,494 root:INFO OC server starting listening on port:80
2013-05-24 14:20:38,041 root:DEBUG URLS: '[('^verify', <function verify at 0x101801668>), ('.+\\.css$', <function css at 0x101801500>), ('safe', <function safe at 0x101801488>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x1018185d0>)]
2013-05-24 14:20:38,041 root:INFO OC server starting listening on port:80
2013-05-24 14:20:48,257 root:DEBUG URLS: '[('^verify', <function verify at 0x101801668>), ('.+\\.css$', <function css at 0x101801500>), ('safe', <function safe at 0x101801488>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x1018185d0>)]
2013-05-24 14:20:48,257 root:INFO OC server starting listening on port:8092
2013-05-24 14:21:46,459 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>
2013-05-24 14:21:46,459 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 14:21:46,459 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 14:21:46,460 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 14:21:46,462 oicServer:ERROR Cant locate template for uri 'login.mako'
Traceback (most recent call last):
File "./oa.py", line 235, in application
return callback(environ, start_response, logger)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/oic/provider.py", line 1235, in __call__
return self.func(*args, **kwargs)
File "./oa.py", line 116, in authorization
logger=logger)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/utils/http_util.py", line 315, in wsgi_wrapper
resp = func(**kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/oauth2/provider.py", line 202, in authorization_endpoint
return self.authn(query=query)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/utils/authn/user.py", line 200, in __call__
mte = self.template_lookup.get_template(self.mako_template)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Mako-0.5.0-py2.7.egg/mako/lookup.py", line 221, in get_template
"Cant locate template for uri %r" % uri)
TopLevelLookupException: Cant locate template for uri 'login.mako'
2013-05-24 14:22:36,310 root:DEBUG URLS: '[('^verify', <function verify at 0x101801668>), ('.+\\.css$', <function css at 0x101801500>), ('safe', <function safe at 0x101801488>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x1018185d0>)]
2013-05-24 14:22:36,310 root:INFO OC server starting listening on port:8092
2013-05-24 14:22:38,794 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>
2013-05-24 14:22:38,795 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 14:22:38,795 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 14:22:38,795 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 14:22:38,850 oicServer:INFO callback: <function verify at 0x101801668>
2013-05-24 14:22:38,850 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 14:22:38,850 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 14:22:38,850 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 14:22:38,852 oicServer:ERROR expected a readable buffer object
Traceback (most recent call last):
File "./oa.py", line 235, in application
return callback(environ, start_response, logger)
File "./oa.py", line 123, in verify
logger=logger)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/utils/http_util.py", line 315, in wsgi_wrapper
resp = func(**kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/utils/authn/user.py", line 227, in verify
cookie = self.create_cookie(_dict["login"][0])
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/utils/authn/user.py", line 49, in create_cookie
self.srv.iv)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/utils/aes_m2c.py", line 32, in AES_encrypt
cipher = AES_build_cipher(key, iv, 1)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/utils/aes_m2c.py", line 18, in AES_build_cipher
return M2Crypto.EVP.Cipher(alg=alg, key=key, iv=iv, op=op)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/M2Crypto-0.21.1-py2.7-macosx-10.7-intel.egg/M2Crypto/EVP.py", line 116, in __init__
m2.cipher_init(self.ctx, self.cipher, key, iv, op)
TypeError: expected a readable buffer object
2013-05-24 14:25:04,978 root:DEBUG URLS: '[('^verify', <function verify at 0x103eae140>), ('.+\\.css$', <function css at 0x103eacf50>), ('safe', <function safe at 0x103eaced8>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x103eb8dd0>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x103eb8e10>)]
2013-05-24 14:25:04,979 root:INFO OC server starting listening on port:80
2013-05-24 14:25:33,100 root:DEBUG URLS: '[('^verify', <function verify at 0x104ab0140>), ('.+\\.css$', <function css at 0x104aaef50>), ('safe', <function safe at 0x104aaeed8>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x104abadd0>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x104abae10>)]
2013-05-24 14:25:33,101 root:INFO OC server starting listening on port:8092
2013-05-24 14:25:42,186 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x104abadd0>
2013-05-24 14:25:42,186 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 14:25:42,186 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 14:25:42,187 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 14:25:42,219 oicServer:INFO callback: <function verify at 0x104ab0140>
2013-05-24 14:25:42,220 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 14:25:42,221 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 14:25:42,221 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 14:25:42,223 oicServer:ERROR expected a readable buffer object
Traceback (most recent call last):
File "/Users/rolandh/code/oic-0.3/oauth_example/oa.py", line 235, in application
return callback(environ, start_response, logger)
File "/Users/rolandh/code/oic-0.3/oauth_example/oa.py", line 123, in verify
logger=logger)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/utils/http_util.py", line 315, in wsgi_wrapper
resp = func(**kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/utils/authn/user.py", line 227, in verify
cookie = self.create_cookie(_dict["login"][0])
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/utils/authn/user.py", line 49, in create_cookie
self.srv.iv)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/utils/aes_m2c.py", line 32, in AES_encrypt
cipher = AES_build_cipher(key, iv, 1)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/utils/aes_m2c.py", line 18, in AES_build_cipher
return M2Crypto.EVP.Cipher(alg=alg, key=key, iv=iv, op=op)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/M2Crypto-0.21.1-py2.7-macosx-10.7-intel.egg/M2Crypto/EVP.py", line 116, in __init__
m2.cipher_init(self.ctx, self.cipher, key, iv, op)
TypeError: expected a readable buffer object
2013-05-24 14:26:47,754 root:DEBUG URLS: '[('^verify', <function verify at 0x103ab3140>), ('.+\\.css$', <function css at 0x103ab1f50>), ('safe', <function safe at 0x103ab1ed8>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x103abddd0>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x103abde10>)]
2013-05-24 14:26:47,755 root:INFO OC server starting listening on port:8092
2013-05-24 14:26:51,066 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x103abddd0>
2013-05-24 14:26:51,067 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 14:26:51,067 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 14:26:51,067 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 14:26:51,102 oicServer:INFO callback: <function verify at 0x103ab3140>
2013-05-24 14:27:39,099 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 14:27:41,292 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 14:27:41,903 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 14:29:52,949 root:DEBUG URLS: '[('^verify', <function verify at 0x101801668>), ('.+\\.css$', <function css at 0x101801500>), ('safe', <function safe at 0x101801488>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x1018185d0>)]
2013-05-24 14:29:52,949 root:INFO OC server starting listening on port:8092
2013-05-24 14:30:01,160 root:DEBUG URLS: '[('^verify', <function verify at 0x101801668>), ('.+\\.css$', <function css at 0x101801500>), ('safe', <function safe at 0x101801488>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x1018185d0>)]
2013-05-24 14:30:01,160 root:INFO OC server starting listening on port:8092
2013-05-24 14:30:03,002 oicServer:INFO callback: <function verify at 0x101801668>
2013-05-24 14:30:03,002 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 14:30:03,002 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 14:30:03,002 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 14:30:09,914 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>
2013-05-24 14:30:09,914 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 14:30:09,914 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 14:30:09,914 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 14:30:09,943 oicServer:INFO callback: <function verify at 0x101801668>
2013-05-24 14:30:09,943 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 14:30:09,943 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 14:30:09,943 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 14:31:02,046 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>
2013-05-24 14:31:02,046 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 14:31:02,046 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 14:31:02,046 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 14:31:02,075 oicServer:INFO callback: <function verify at 0x101801668>
2013-05-24 14:31:02,075 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 14:31:02,075 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 14:31:02,075 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 14:32:48,142 root:DEBUG URLS: '[('^verify', <function verify at 0x101801668>), ('.+\\.css$', <function css at 0x101801500>), ('safe', <function safe at 0x101801488>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x1018185d0>)]
2013-05-24 14:32:48,142 root:INFO OC server starting listening on port:8092
2013-05-24 14:34:29,105 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>
2013-05-24 14:34:29,105 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 14:34:29,105 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 14:34:29,105 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 14:34:34,561 oicServer:INFO callback: <function verify at 0x101801668>
2013-05-24 14:34:34,561 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 14:34:34,561 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 14:34:34,561 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 14:34:58,154 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>
2013-05-24 14:34:58,154 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 14:34:58,154 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 14:34:58,154 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 14:35:05,046 oicServer:INFO callback: <function verify at 0x101801668>
2013-05-24 14:35:05,046 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 14:35:05,047 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 14:35:05,047 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 14:35:52,794 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>
2013-05-24 14:35:52,794 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 14:35:52,794 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 14:35:52,794 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 14:35:58,230 oicServer:INFO callback: <function verify at 0x101801668>
2013-05-24 14:35:58,230 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 14:35:58,230 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 14:35:58,230 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 14:36:34,677 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>
2013-05-24 14:36:34,677 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 14:36:34,677 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 14:36:34,677 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 14:36:39,579 oicServer:INFO callback: <function verify at 0x101801668>
2013-05-24 14:36:39,579 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 14:36:39,579 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 14:36:39,579 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 14:37:11,811 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>
2013-05-24 14:37:11,811 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 14:37:11,811 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 14:37:11,812 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 14:37:16,575 oicServer:INFO callback: <function verify at 0x101801668>
2013-05-24 14:37:16,575 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 14:37:16,575 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 14:37:16,575 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 14:38:11,346 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>
2013-05-24 14:38:11,347 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 14:38:11,347 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 14:38:11,347 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 14:38:15,311 oicServer:INFO callback: <function verify at 0x101801668>
2013-05-24 14:38:15,311 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 14:38:15,311 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 14:38:15,311 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 14:42:28,494 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>
2013-05-24 14:42:28,494 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 14:42:28,494 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 14:42:28,494 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 14:43:28,070 oicServer:INFO callback: <function verify at 0x101801668>
2013-05-24 14:43:28,071 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 14:43:28,071 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 14:43:28,071 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 14:45:36,531 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>
2013-05-24 14:45:36,531 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 14:45:36,531 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 14:45:36,531 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 14:46:55,906 oicServer:INFO callback: <function verify at 0x101801668>
2013-05-24 14:46:55,907 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 14:46:55,907 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 14:46:55,907 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 14:52:28,641 root:DEBUG URLS: '[('^verify', <function verify at 0x1045b0140>), ('.+\\.css$', <function css at 0x1045aef50>), ('safe', <function safe at 0x1045aeed8>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x1045badd0>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x1045bae10>)]
2013-05-24 14:52:28,642 root:INFO OC server starting listening on port:8092
2013-05-24 14:53:27,712 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x1045badd0>
2013-05-24 14:53:27,713 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 14:53:27,713 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 14:53:27,713 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 14:53:33,566 oicServer:INFO callback: <function verify at 0x1045b0140>
2013-05-24 14:53:53,672 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 14:53:58,513 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 14:53:59,230 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 14:57:37,752 root:DEBUG URLS: '[('^verify', <function verify at 0x103db0140>), ('.+\\.css$', <function css at 0x103daef50>), ('safe', <function safe at 0x103daeed8>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x103dbadd0>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x103dbae10>)]
2013-05-24 14:57:37,753 root:INFO OC server starting listening on port:8092
2013-05-24 14:58:39,682 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x103dbadd0>
2013-05-24 14:58:55,488 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 14:58:56,486 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 14:59:19,205 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 14:59:47,860 oicServer:INFO callback: <function verify at 0x103db0140>
2013-05-24 15:00:06,495 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:00:08,212 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:00:08,726 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:00:51,779 root:DEBUG URLS: '[('^verify', <function verify at 0x1045ad140>), ('.+\\.css$', <function css at 0x1045abf50>), ('safe', <function safe at 0x1045abed8>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x1045b7dd0>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x1045b7e10>)]
2013-05-24 15:00:51,779 root:INFO OC server starting listening on port:8092
2013-05-24 15:00:59,265 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x1045b7dd0>
2013-05-24 15:01:01,197 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:01:01,198 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 15:01:01,198 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 15:01:06,016 oicServer:INFO callback: <function verify at 0x1045ad140>
2013-05-24 15:01:12,493 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:01:14,482 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:01:15,029 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:01:19,821 oic.utils.authn.user:DEBUG kwargs: {'upm_answer': 'true'}
2013-05-24 15:01:58,042 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x1045b7dd0>
2013-05-24 15:02:03,819 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:02:03,820 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 15:02:03,820 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 15:02:48,232 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x1045b7dd0>
2013-05-24 15:02:53,261 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:02:53,261 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 15:02:53,261 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 15:02:53,293 oicServer:INFO callback: <function verify at 0x1045ad140>
2013-05-24 15:02:55,218 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:02:55,219 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:02:55,219 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:02:55,220 oic.utils.authn.user:DEBUG kwargs: {'upm_answer': 'true'}
2013-05-24 15:02:55,252 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x1045b7dd0>
2013-05-24 15:02:56,131 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:02:56,131 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 15:02:56,132 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 15:03:39,517 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x1045b7dd0>
2013-05-24 15:03:41,778 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:03:41,779 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 15:03:41,779 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 15:03:49,584 oicServer:INFO callback: <function verify at 0x1045ad140>
2013-05-24 15:03:52,275 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:03:52,276 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:03:52,276 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:03:52,277 oic.utils.authn.user:DEBUG kwargs: {'upm_answer': 'true'}
2013-05-24 15:03:54,853 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x1045b7dd0>
2013-05-24 15:04:00,580 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:04:00,580 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 15:04:00,581 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 15:04:26,881 root:DEBUG URLS: '[('^verify', <function verify at 0x101801668>), ('.+\\.css$', <function css at 0x101801500>), ('safe', <function safe at 0x101801488>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x101818610>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x101818650>)]
2013-05-24 15:04:26,881 root:INFO OC server starting listening on port:8092
2013-05-24 15:04:41,414 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x101818610>
2013-05-24 15:04:41,415 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:04:41,415 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 15:04:41,415 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 15:06:09,154 oicServer:INFO callback: <function verify at 0x101801668>
2013-05-24 15:06:09,154 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:06:09,154 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:06:09,154 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:06:09,155 oic.utils.authn.user:DEBUG kwargs: {'upm_answer': 'true'}
2013-05-24 15:07:04,870 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x101818610>
2013-05-24 15:07:04,870 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:07:04,870 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 15:07:04,870 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 15:07:55,231 root:DEBUG URLS: '[('^verify', <function verify at 0x1052b0140>), ('.+\\.css$', <function css at 0x1052aef50>), ('safe', <function safe at 0x1052aeed8>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x1052badd0>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x1052bae10>)]
2013-05-24 15:07:55,232 root:INFO OC server starting listening on port:8092
2013-05-24 15:07:58,038 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x1052badd0>
2013-05-24 15:08:21,416 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:08:22,025 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 15:08:33,719 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 15:08:33,755 oicServer:INFO callback: <function verify at 0x1052b0140>
2013-05-24 15:09:52,462 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:09:52,462 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:09:52,463 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:09:52,464 oic.utils.authn.user:DEBUG kwargs: {'upm_answer': 'true'}
2013-05-24 15:11:34,929 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x1052badd0>
2013-05-24 15:12:18,624 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:12:20,381 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 15:12:51,448 root:DEBUG URLS: '[('^verify', <function verify at 0x1036b0140>), ('.+\\.css$', <function css at 0x1036aff50>), ('safe', <function safe at 0x1036afed8>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x1036badd0>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x1036bae10>)]
2013-05-24 15:12:51,448 root:INFO OC server starting listening on port:8092
2013-05-24 15:12:59,826 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x1036badd0>
2013-05-24 15:13:00,750 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:13:00,751 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 15:13:09,910 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 15:13:11,324 oicServer:INFO callback: <function verify at 0x1036b0140>
2013-05-24 15:13:13,708 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:13:13,709 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:13:13,709 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:13:13,710 oic.utils.authn.user:DEBUG kwargs: {'upm_answer': 'true'}
2013-05-24 15:13:21,352 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x1036badd0>
2013-05-24 15:13:22,210 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:13:22,210 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 15:15:05,223 root:DEBUG URLS: '[('^verify', <function verify at 0x101801668>), ('.+\\.css$', <function css at 0x101801500>), ('safe', <function safe at 0x101801488>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x1018185d0>)]
2013-05-24 15:15:05,223 root:INFO OC server starting listening on port:8092
2013-05-24 15:15:26,919 root:DEBUG URLS: '[('^verify', <function verify at 0x103ead140>), ('.+\\.css$', <function css at 0x103eacf50>), ('safe', <function safe at 0x103eaced8>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x103eb7dd0>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x103eb7e10>)]
2013-05-24 15:15:26,920 root:INFO OC server starting listening on port:8092
2013-05-24 15:15:35,978 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x103eb7dd0>
2013-05-24 15:15:36,800 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:15:36,800 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 15:15:36,802 oicServer:ERROR 'cookie'
Traceback (most recent call last):
File "/Users/rolandh/code/oic-0.3/oauth_example/oa.py", line 235, in application
return callback(environ, start_response, logger)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/oic/provider.py", line 1235, in __call__
return self.func(*args, **kwargs)
File "/Users/rolandh/code/oic-0.3/oauth_example/oa.py", line 116, in authorization
logger=logger)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/utils/http_util.py", line 315, in wsgi_wrapper
resp = func(**kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/oauth2/provider.py", line 200, in authorization_endpoint
identity = self.authn.authenticated_as(kwargs["cookie"])
KeyError: 'cookie'
2013-05-24 15:17:53,794 root:DEBUG URLS: '[('^verify', <function verify at 0x1045b0140>), ('.+\\.css$', <function css at 0x1045aff50>), ('safe', <function safe at 0x1045afed8>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x1045badd0>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x1045bae10>)]
2013-05-24 15:17:53,795 root:INFO OC server starting listening on port:8092
2013-05-24 15:18:03,214 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x1045badd0>
2013-05-24 15:18:04,553 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:18:04,553 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 15:18:04,555 oicServer:ERROR 'cookie'
Traceback (most recent call last):
File "/Users/rolandh/code/oic-0.3/oauth_example/oa.py", line 235, in application
return callback(environ, start_response, logger)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/oic/provider.py", line 1235, in __call__
return self.func(*args, **kwargs)
File "/Users/rolandh/code/oic-0.3/oauth_example/oa.py", line 116, in authorization
logger=logger)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/utils/http_util.py", line 315, in wsgi_wrapper
resp = func(**kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/oauth2/provider.py", line 200, in authorization_endpoint
identity = self.authn.authenticated_as(kwargs["cookie"])
KeyError: 'cookie'
2013-05-24 15:18:15,273 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x1045badd0>
2013-05-24 15:19:54,378 root:DEBUG URLS: '[('^verify', <function verify at 0x101801668>), ('.+\\.css$', <function css at 0x101801500>), ('safe', <function safe at 0x101801488>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x101818610>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x101818650>)]
2013-05-24 15:19:54,378 root:INFO OC server starting listening on port:8092
2013-05-24 15:19:56,863 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x101818610>
2013-05-24 15:19:56,863 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:19:56,863 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 15:19:56,863 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 15:19:56,893 oicServer:INFO callback: <function verify at 0x101801668>
2013-05-24 15:19:56,893 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:19:56,894 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:19:56,894 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:19:56,894 oic.utils.authn.user:DEBUG kwargs: {'upm_answer': 'true'}
2013-05-24 15:19:56,922 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x101818610>
2013-05-24 15:19:56,923 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:19:56,923 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 15:19:56,923 oic.utils.authn.user:DEBUG kwargs: {}
2013-05-24 15:19:56,923 oic.oauth2.provider:DEBUG - authenticated -
2013-05-24 15:21:46,067 root:DEBUG URLS: '[('^verify', <function verify at 0x103ead140>), ('.+\\.css$', <function css at 0x103eacf50>), ('safe', <function safe at 0x103eaced8>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x103eb7dd0>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x103eb7e10>)]
2013-05-24 15:21:46,068 root:INFO OC server starting listening on port:8092
2013-05-24 15:21:50,969 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x103eb7dd0>
2013-05-24 15:21:57,969 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:21:58,779 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 15:22:30,698 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': '', 'login': '', 'password': ''}
2013-05-24 15:22:44,201 oicServer:INFO callback: <function verify at 0x103ead140>
2013-05-24 15:22:56,629 oic.utils.authn.user:DEBUG verify(query=&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:22:59,374 oic.utils.authn.user:DEBUG dict: {'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:23:00,008 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:23:04,719 oic.utils.authn.user:DEBUG kwargs: {'upm_answer': 'true'}
2013-05-24 15:23:09,135 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x103eb7dd0>
2013-05-24 15:23:14,699 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:23:15,301 oic.oauth2.provider:DEBUG Query: ''
2013-05-24 15:23:24,065 oic.utils.authn.user:DEBUG kwargs: {}
2013-05-24 15:23:49,754 oic.oauth2.provider:DEBUG - authenticated -
2013-05-24 15:24:12,020 root:DEBUG URLS: '[('^verify', <function verify at 0x104bb0140>), ('.+\\.css$', <function css at 0x104baff50>), ('safe', <function safe at 0x104bafed8>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x104bbadd0>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x104bbae10>)]
2013-05-24 15:24:12,020 root:INFO OC server starting listening on port:8092
2013-05-24 15:24:20,503 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x104bbadd0>
2013-05-24 15:26:08,118 root:DEBUG URLS: '[('^verify', <function verify at 0x1043b0140>), ('.+\\.css$', <function css at 0x1043aff50>), ('safe', <function safe at 0x1043afed8>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x1043badd0>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x1043bae10>)]
2013-05-24 15:26:08,118 root:INFO OC server starting listening on port:8092
2013-05-24 15:26:15,199 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x1043badd0>
2013-05-24 15:26:23,341 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:26:23,342 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'
2013-05-24 15:26:23,342 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq', 'login': '', 'password': ''}
2013-05-24 15:26:25,838 oicServer:INFO callback: <function verify at 0x1043b0140>
2013-05-24 15:26:31,258 oic.utils.authn.user:DEBUG verify(query=state%3DSTATE0%26redirect_uri%3Dhttps%253A%252F%252Flocalhost%253A8091%252F%26response_type%3Dcode%26client_id%3DJOVPpP2srljq&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:26:31,259 oic.utils.authn.user:DEBUG dict: {'query': ['state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'], 'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:26:31,259 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:26:31,261 oic.utils.authn.user:DEBUG kwargs: {'state': ['STATE0'], 'redirect_uri': ['https://localhost:8091/'], 'response_type': ['code'], 'client_id': ['JOVPpP2srljq'], 'upm_answer': 'true'}
2013-05-24 15:26:35,663 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x1043badd0>
2013-05-24 15:26:43,042 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:26:43,650 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq&upm_answer=true'
2013-05-24 15:26:45,347 oic.utils.authn.user:DEBUG kwargs: {}
2013-05-24 15:26:47,301 oic.oauth2.provider:DEBUG - authenticated -
2013-05-24 15:27:02,466 oicServer:ERROR 'NoneType' object is not callable
Traceback (most recent call last):
File "/Users/rolandh/code/oic-0.3/oauth_example/oa.py", line 235, in application
return callback(environ, start_response, logger)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/oic/provider.py", line 1235, in __call__
return self.func(*args, **kwargs)
File "/Users/rolandh/code/oic-0.3/oauth_example/oa.py", line 116, in authorization
logger=logger)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/utils/http_util.py", line 315, in wsgi_wrapper
resp = func(**kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/oauth2/provider.py", line 226, in authorization_endpoint
permission = self.authz(session["sub"], session)
TypeError: 'NoneType' object is not callable
2013-05-24 15:27:35,057 root:DEBUG URLS: '[('^verify', <function verify at 0x103ead140>), ('.+\\.css$', <function css at 0x103eacf50>), ('safe', <function safe at 0x103eaced8>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x103eb7dd0>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x103eb7e10>)]
2013-05-24 15:27:35,058 root:INFO OC server starting listening on port:8092
2013-05-24 15:27:40,479 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x103eb7dd0>
2013-05-24 15:27:42,050 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:27:42,050 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'
2013-05-24 15:27:42,051 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq', 'login': '', 'password': ''}
2013-05-24 15:27:42,813 oicServer:INFO callback: <function verify at 0x103ead140>
2013-05-24 15:27:44,490 oic.utils.authn.user:DEBUG verify(query=state%3DSTATE0%26redirect_uri%3Dhttps%253A%252F%252Flocalhost%253A8091%252F%26response_type%3Dcode%26client_id%3DJOVPpP2srljq&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:27:44,491 oic.utils.authn.user:DEBUG dict: {'query': ['state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'], 'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:27:44,491 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:27:44,492 oic.utils.authn.user:DEBUG kwargs: {'state': ['STATE0'], 'redirect_uri': ['https://localhost:8091/'], 'response_type': ['code'], 'client_id': ['JOVPpP2srljq'], 'upm_answer': 'true'}
2013-05-24 15:27:45,458 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x103eb7dd0>
2013-05-24 15:27:47,330 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:27:47,331 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq&upm_answer=true'
2013-05-24 15:27:47,331 oic.utils.authn.user:DEBUG kwargs: {}
2013-05-24 15:27:47,332 oic.oauth2.provider:DEBUG - authenticated -
2013-05-24 15:27:47,336 oicServer:ERROR 'NoneType' object is not callable
Traceback (most recent call last):
File "/Users/rolandh/code/oic-0.3/oauth_example/oa.py", line 235, in application
return callback(environ, start_response, logger)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/oic/provider.py", line 1235, in __call__
return self.func(*args, **kwargs)
File "/Users/rolandh/code/oic-0.3/oauth_example/oa.py", line 116, in authorization
logger=logger)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/utils/http_util.py", line 315, in wsgi_wrapper
resp = func(**kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/oauth2/provider.py", line 226, in authorization_endpoint
permission = self.authz(session["sub"], session)
TypeError: 'NoneType' object is not callable
2013-05-24 15:28:04,624 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x103eb7dd0>
2013-05-24 15:28:06,031 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:28:06,032 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'
2013-05-24 15:28:06,032 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq', 'login': '', 'password': ''}
2013-05-24 15:28:06,762 oicServer:INFO callback: <function verify at 0x103ead140>
2013-05-24 15:28:08,281 oic.utils.authn.user:DEBUG verify(query=state%3DSTATE0%26redirect_uri%3Dhttps%253A%252F%252Flocalhost%253A8091%252F%26response_type%3Dcode%26client_id%3DJOVPpP2srljq&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:28:08,282 oic.utils.authn.user:DEBUG dict: {'query': ['state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'], 'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:28:08,282 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:28:08,283 oic.utils.authn.user:DEBUG kwargs: {'state': ['STATE0'], 'redirect_uri': ['https://localhost:8091/'], 'response_type': ['code'], 'client_id': ['JOVPpP2srljq'], 'upm_answer': 'true'}
2013-05-24 15:28:14,001 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x103eb7dd0>
2013-05-24 15:28:20,193 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:28:21,863 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq&upm_answer=true'
2013-05-24 15:28:23,714 oic.utils.authn.user:DEBUG kwargs: {}
2013-05-24 15:28:26,829 oic.oauth2.provider:DEBUG - authenticated -
2013-05-24 15:30:27,195 root:DEBUG URLS: '[('^verify', <function verify at 0x1057ad140>), ('.+\\.css$', <function css at 0x1057acf50>), ('safe', <function safe at 0x1057aced8>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x1057b7dd0>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x1057b7e10>)]
2013-05-24 15:30:27,196 root:INFO OC server starting listening on port:8092
2013-05-24 15:30:34,495 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x1057b7dd0>
2013-05-24 15:30:35,747 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:30:35,747 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'
2013-05-24 15:30:35,748 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq', 'login': '', 'password': ''}
2013-05-24 15:30:36,317 oicServer:INFO callback: <function verify at 0x1057ad140>
2013-05-24 15:30:37,601 oic.utils.authn.user:DEBUG verify(query=state%3DSTATE0%26redirect_uri%3Dhttps%253A%252F%252Flocalhost%253A8091%252F%26response_type%3Dcode%26client_id%3DJOVPpP2srljq&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:30:37,601 oic.utils.authn.user:DEBUG dict: {'query': ['state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'], 'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:30:37,602 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:30:37,603 oic.utils.authn.user:DEBUG kwargs: {'state': ['STATE0'], 'redirect_uri': ['https://localhost:8091/'], 'response_type': ['code'], 'client_id': ['JOVPpP2srljq'], 'upm_answer': 'true'}
2013-05-24 15:30:38,237 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x1057b7dd0>
2013-05-24 15:30:39,544 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:30:39,544 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq&upm_answer=true'
2013-05-24 15:30:39,544 oic.utils.authn.user:DEBUG kwargs: {}
2013-05-24 15:30:39,545 oic.oauth2.provider:DEBUG - authenticated -
2013-05-24 15:30:40,234 oic.oauth2.provider:DEBUG code: 'ZTK2zzqRfZLsvNmg7tBsKQqewVU091QnutXZ+Fr0el0CHAMUqpkp7lmEatAOYO2o'
2013-05-24 15:30:40,237 oicServer:ERROR too many values to unpack
Traceback (most recent call last):
File "/Users/rolandh/code/oic-0.3/oauth_example/oa.py", line 235, in application
return callback(environ, start_response, logger)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/oic/provider.py", line 1235, in __call__
return self.func(*args, **kwargs)
File "/Users/rolandh/code/oic-0.3/oauth_example/oa.py", line 116, in authorization
logger=logger)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/utils/http_util.py", line 315, in wsgi_wrapper
resp = func(**kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/oauth2/provider.py", line 241, in authorization_endpoint
add_non_standard(aresp, areq)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/oauth2/message.py", line 596, in add_non_standard
for key, val in msg2.extra():
ValueError: too many values to unpack
2013-05-24 15:30:57,955 root:DEBUG URLS: '[('^verify', <function verify at 0x104cb0140>), ('.+\\.css$', <function css at 0x104caff50>), ('safe', <function safe at 0x104cafed8>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x104cbadd0>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x104cbae10>)]
2013-05-24 15:30:57,955 root:INFO OC server starting listening on port:8092
2013-05-24 15:31:03,078 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x104cbadd0>
2013-05-24 15:31:04,261 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:31:04,262 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'
2013-05-24 15:31:04,262 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq', 'login': '', 'password': ''}
2013-05-24 15:31:04,969 oicServer:INFO callback: <function verify at 0x104cb0140>
2013-05-24 15:31:06,593 oic.utils.authn.user:DEBUG verify(query=state%3DSTATE0%26redirect_uri%3Dhttps%253A%252F%252Flocalhost%253A8091%252F%26response_type%3Dcode%26client_id%3DJOVPpP2srljq&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:31:06,594 oic.utils.authn.user:DEBUG dict: {'query': ['state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'], 'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:31:06,594 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:31:06,595 oic.utils.authn.user:DEBUG kwargs: {'state': ['STATE0'], 'redirect_uri': ['https://localhost:8091/'], 'response_type': ['code'], 'client_id': ['JOVPpP2srljq'], 'upm_answer': 'true'}
2013-05-24 15:31:07,268 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x104cbadd0>
2013-05-24 15:31:09,002 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:31:09,003 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq&upm_answer=true'
2013-05-24 15:31:09,003 oic.utils.authn.user:DEBUG kwargs: {}
2013-05-24 15:31:09,004 oic.oauth2.provider:DEBUG - authenticated -
2013-05-24 15:31:10,047 oic.oauth2.provider:DEBUG code: 'r/dJqkZ8QEc769UHBL/a0CYTyMB6fCVPzw4va6Fiy1yEFTYDH+xP/XaBekefcOQR'
2013-05-24 15:31:10,050 oicServer:ERROR too many values to unpack
Traceback (most recent call last):
File "/Users/rolandh/code/oic-0.3/oauth_example/oa.py", line 235, in application
return callback(environ, start_response, logger)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/oic/provider.py", line 1235, in __call__
return self.func(*args, **kwargs)
File "/Users/rolandh/code/oic-0.3/oauth_example/oa.py", line 116, in authorization
logger=logger)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/utils/http_util.py", line 315, in wsgi_wrapper
resp = func(**kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/oauth2/provider.py", line 241, in authorization_endpoint
add_non_standard(aresp, areq)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/oauth2/message.py", line 596, in add_non_standard
for key, val in msg2.extra():
ValueError: too many values to unpack
2013-05-24 15:31:19,809 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x104cbadd0>
2013-05-24 15:31:22,148 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:31:22,148 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'
2013-05-24 15:31:22,149 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq', 'login': '', 'password': ''}
2013-05-24 15:31:22,862 oicServer:INFO callback: <function verify at 0x104cb0140>
2013-05-24 15:31:24,251 oic.utils.authn.user:DEBUG verify(query=state%3DSTATE0%26redirect_uri%3Dhttps%253A%252F%252Flocalhost%253A8091%252F%26response_type%3Dcode%26client_id%3DJOVPpP2srljq&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:31:24,251 oic.utils.authn.user:DEBUG dict: {'query': ['state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'], 'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:31:24,252 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:31:24,254 oic.utils.authn.user:DEBUG kwargs: {'state': ['STATE0'], 'redirect_uri': ['https://localhost:8091/'], 'response_type': ['code'], 'client_id': ['JOVPpP2srljq'], 'upm_answer': 'true'}
2013-05-24 15:31:24,911 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x104cbadd0>
2013-05-24 15:31:26,368 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:31:26,369 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq&upm_answer=true'
2013-05-24 15:31:26,369 oic.utils.authn.user:DEBUG kwargs: {}
2013-05-24 15:31:26,370 oic.oauth2.provider:DEBUG - authenticated -
2013-05-24 15:31:38,657 oic.oauth2.provider:DEBUG code: 'slcqrTaGpFjq//b+HfcSCMA2SQKxzXtkDv8RxAjhLYQXSFMnDXDmIWssY5gnr6tf'
2013-05-24 15:32:15,921 root:DEBUG URLS: '[('^verify', <function verify at 0x103fad140>), ('.+\\.css$', <function css at 0x103facf50>), ('safe', <function safe at 0x103faced8>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x103fb7dd0>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x103fb7e10>)]
2013-05-24 15:32:15,922 root:INFO OC server starting listening on port:8092
2013-05-24 15:32:20,086 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x103fb7dd0>
2013-05-24 15:32:21,442 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:32:21,442 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'
2013-05-24 15:32:21,443 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq', 'login': '', 'password': ''}
2013-05-24 15:32:22,077 oicServer:INFO callback: <function verify at 0x103fad140>
2013-05-24 15:32:23,315 oic.utils.authn.user:DEBUG verify(query=state%3DSTATE0%26redirect_uri%3Dhttps%253A%252F%252Flocalhost%253A8091%252F%26response_type%3Dcode%26client_id%3DJOVPpP2srljq&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:32:23,316 oic.utils.authn.user:DEBUG dict: {'query': ['state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'], 'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:32:23,316 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:32:23,317 oic.utils.authn.user:DEBUG kwargs: {'state': ['STATE0'], 'redirect_uri': ['https://localhost:8091/'], 'response_type': ['code'], 'client_id': ['JOVPpP2srljq'], 'upm_answer': 'true'}
2013-05-24 15:32:23,952 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x103fb7dd0>
2013-05-24 15:32:25,325 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:32:25,326 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq&upm_answer=true'
2013-05-24 15:32:25,326 oic.utils.authn.user:DEBUG kwargs: {}
2013-05-24 15:32:25,327 oic.oauth2.provider:DEBUG - authenticated -
2013-05-24 15:32:27,450 oic.oauth2.provider:DEBUG code: '0hTWh1VOTrUs+Dr2YmL62kK7HeVP2jERljWZiv7a457iK514r/krsjE8xJUHTbqk'
2013-05-24 15:33:56,853 root:DEBUG URLS: '[('^verify', <function verify at 0x102fb0140>), ('.+\\.css$', <function css at 0x102faff50>), ('safe', <function safe at 0x102fafed8>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x102fbadd0>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x102fbae10>)]
2013-05-24 15:33:56,854 root:INFO OC server starting listening on port:8092
2013-05-24 15:34:01,045 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x102fbadd0>
2013-05-24 15:34:04,016 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:34:04,017 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'
2013-05-24 15:34:04,017 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq', 'login': '', 'password': ''}
2013-05-24 15:34:04,708 oicServer:INFO callback: <function verify at 0x102fb0140>
2013-05-24 15:34:05,997 oic.utils.authn.user:DEBUG verify(query=state%3DSTATE0%26redirect_uri%3Dhttps%253A%252F%252Flocalhost%253A8091%252F%26response_type%3Dcode%26client_id%3DJOVPpP2srljq&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:34:05,997 oic.utils.authn.user:DEBUG dict: {'query': ['state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'], 'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:34:05,998 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:34:05,999 oic.utils.authn.user:DEBUG kwargs: {'state': ['STATE0'], 'redirect_uri': ['https://localhost:8091/'], 'response_type': ['code'], 'client_id': ['JOVPpP2srljq'], 'upm_answer': 'true'}
2013-05-24 15:34:06,621 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x102fbadd0>
2013-05-24 15:34:08,081 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:34:08,081 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq&upm_answer=true'
2013-05-24 15:34:08,082 oic.utils.authn.user:DEBUG kwargs: {}
2013-05-24 15:34:08,083 oic.oauth2.provider:DEBUG - authenticated -
2013-05-24 15:34:09,828 oic.oauth2.provider:DEBUG code: 'I97Orp5iO+Y0ACQ3/E3Oo1hVXBKeEwDpX5gdS7w4HVI5UYL5tOecLrq96jYJjBpi'
2013-05-24 15:34:22,805 oic.oauth2.provider:DEBUG Redirected to: 'https://localhost:8091/?state=STATE0&code=I97Orp5iO%2BY0ACQ3%2FE3Oo1hVXBKeEwDpX5gdS7w4HVI5UYL5tOecLrq96jYJjBpi&upm_answer=true' (<type 'str'>)
2013-05-24 15:34:42,742 oicServer:INFO callback: <oic.oic.provider.TokenEndpoint object at 0x102fbae10>
2013-05-24 15:34:43,803 oic.oauth2.provider:DEBUG - token -
2013-05-24 15:34:43,805 oicServer:ERROR 'post'
Traceback (most recent call last):
File "/Users/rolandh/code/oic-0.3/oauth_example/oa.py", line 235, in application
return callback(environ, start_response, logger)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/oic/provider.py", line 1235, in __call__
return self.func(*args, **kwargs)
File "/Users/rolandh/code/oic-0.3/oauth_example/oa.py", line 108, in token
logger=logger)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/utils/http_util.py", line 315, in wsgi_wrapper
resp = func(**kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oic-0.3.0-py2.7.egg/oic/oauth2/provider.py", line 253, in token_endpoint
body = kwargs["post"]
KeyError: 'post'
2013-05-24 15:35:20,758 root:DEBUG URLS: '[('^verify', <function verify at 0x1036b0140>), ('.+\\.css$', <function css at 0x1036aff50>), ('safe', <function safe at 0x1036afed8>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x1036badd0>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x1036bae10>)]
2013-05-24 15:35:20,758 root:INFO OC server starting listening on port:8092
2013-05-24 15:35:46,250 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x1036badd0>
2013-05-24 15:35:48,848 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:35:48,849 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'
2013-05-24 15:35:48,849 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq', 'login': '', 'password': ''}
2013-05-24 15:35:50,145 oicServer:INFO callback: <function verify at 0x1036b0140>
2013-05-24 15:35:54,650 oic.utils.authn.user:DEBUG verify(query=state%3DSTATE0%26redirect_uri%3Dhttps%253A%252F%252Flocalhost%253A8091%252F%26response_type%3Dcode%26client_id%3DJOVPpP2srljq&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:35:54,651 oic.utils.authn.user:DEBUG dict: {'query': ['state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'], 'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:35:54,651 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:35:54,652 oic.utils.authn.user:DEBUG kwargs: {'state': ['STATE0'], 'redirect_uri': ['https://localhost:8091/'], 'response_type': ['code'], 'client_id': ['JOVPpP2srljq'], 'upm_answer': 'true'}
2013-05-24 15:35:55,498 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x1036badd0>
2013-05-24 15:35:57,782 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:35:57,783 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq&upm_answer=true'
2013-05-24 15:35:57,784 oic.utils.authn.user:DEBUG kwargs: {}
2013-05-24 15:35:57,785 oic.oauth2.provider:DEBUG - authenticated -
2013-05-24 15:35:58,813 oic.oauth2.provider:DEBUG code: 'cjcg4SBt7yeuVMM4aGVnEXD3q/m4XOdnYGKhwAv6zdV/CddC59xcAQOUci7h7A2m'
2013-05-24 15:35:58,816 oic.oauth2.provider:DEBUG Redirected to: 'https://localhost:8091/?state=STATE0&code=cjcg4SBt7yeuVMM4aGVnEXD3q%2Fm4XOdnYGKhwAv6zdV%2FCddC59xcAQOUci7h7A2m&upm_answer=true' (<type 'str'>)
2013-05-24 15:36:02,434 oicServer:INFO callback: <oic.oic.provider.TokenEndpoint object at 0x1036bae10>
2013-05-24 15:36:12,741 oic.oauth2.provider:DEBUG - token -
2013-05-24 15:37:43,363 root:DEBUG URLS: '[('^verify', <function verify at 0x104ab0140>), ('.+\\.css$', <function css at 0x104aaff50>), ('safe', <function safe at 0x104aafed8>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x104abadd0>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x104abae10>)]
2013-05-24 15:37:43,363 root:INFO OC server starting listening on port:8092
2013-05-24 15:37:48,520 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x104abadd0>
2013-05-24 15:37:49,905 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:37:49,905 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'
2013-05-24 15:37:49,906 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq', 'login': '', 'password': ''}
2013-05-24 15:37:50,588 oicServer:INFO callback: <function verify at 0x104ab0140>
2013-05-24 15:37:52,185 oic.utils.authn.user:DEBUG verify(query=state%3DSTATE0%26redirect_uri%3Dhttps%253A%252F%252Flocalhost%253A8091%252F%26response_type%3Dcode%26client_id%3DJOVPpP2srljq&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:37:52,186 oic.utils.authn.user:DEBUG dict: {'query': ['state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'], 'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:37:52,186 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:37:52,188 oic.utils.authn.user:DEBUG kwargs: {'state': ['STATE0'], 'redirect_uri': ['https://localhost:8091/'], 'response_type': ['code'], 'client_id': ['JOVPpP2srljq'], 'upm_answer': 'true'}
2013-05-24 15:37:52,859 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x104abadd0>
2013-05-24 15:37:54,124 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:37:54,124 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq&upm_answer=true'
2013-05-24 15:37:54,125 oic.utils.authn.user:DEBUG kwargs: {}
2013-05-24 15:37:54,125 oic.oauth2.provider:DEBUG - authenticated -
2013-05-24 15:37:54,739 oic.oauth2.provider:DEBUG code: '80vm5fJH4xp9v+BNrcJnj2BfF0OdUTAzZReMG+z9zp+eiTiv6PUBNC5C3TDO7hmX'
2013-05-24 15:37:54,742 oic.oauth2.provider:DEBUG Redirected to: 'https://localhost:8091/?state=STATE0&code=80vm5fJH4xp9v%2BBNrcJnj2BfF0OdUTAzZReMG%2Bz9zp%2BeiTiv6PUBNC5C3TDO7hmX&upm_answer=true' (<type 'str'>)
2013-05-24 15:37:55,549 oicServer:INFO callback: <oic.oic.provider.TokenEndpoint object at 0x104abae10>
2013-05-24 15:38:02,370 oic.oauth2.provider:DEBUG - token -
2013-05-24 15:38:03,707 oic.oauth2.provider:DEBUG body: code=80vm5fJH4xp9v%2BBNrcJnj2BfF0OdUTAzZReMG%2Bz9zp%2BeiTiv6PUBNC5C3TDO7hmX&grant_type=authorization_code&client_id=JOVPpP2srljq&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F
2013-05-24 15:38:07,491 oic.oauth2.provider:DEBUG REQ: {'redirect_uri': 'https://localhost:8091/', 'code': '80vm5fJH4xp9v+BNrcJnj2BfF0OdUTAzZReMG+z9zp+eiTiv6PUBNC5C3TDO7hmX', 'client_id': 'JOVPpP2srljq', 'grant_type': 'authorization_code'}
2013-05-24 15:38:07,491 oic.oauth2.provider:DEBUG Unknown client_id
2013-05-24 15:38:37,160 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x104abadd0>
2013-05-24 15:38:38,443 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:38:38,444 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'
2013-05-24 15:38:38,444 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq', 'login': '', 'password': ''}
2013-05-24 15:38:39,055 oicServer:INFO callback: <function verify at 0x104ab0140>
2013-05-24 15:38:40,258 oic.utils.authn.user:DEBUG verify(query=state%3DSTATE0%26redirect_uri%3Dhttps%253A%252F%252Flocalhost%253A8091%252F%26response_type%3Dcode%26client_id%3DJOVPpP2srljq&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:38:40,259 oic.utils.authn.user:DEBUG dict: {'query': ['state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'], 'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:38:40,259 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:38:40,261 oic.utils.authn.user:DEBUG kwargs: {'state': ['STATE0'], 'redirect_uri': ['https://localhost:8091/'], 'response_type': ['code'], 'client_id': ['JOVPpP2srljq'], 'upm_answer': 'true'}
2013-05-24 15:38:40,962 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x104abadd0>
2013-05-24 15:38:42,377 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:38:42,377 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq&upm_answer=true'
2013-05-24 15:38:42,378 oic.utils.authn.user:DEBUG kwargs: {}
2013-05-24 15:38:42,379 oic.oauth2.provider:DEBUG - authenticated -
2013-05-24 15:38:43,080 oic.oauth2.provider:DEBUG code: 'kbq/IWANUaxg5PznPPlB4326L0t/NFMLU3yJNdcXOe0RLSAP0zTpQMqFSD/UGecy'
2013-05-24 15:38:43,083 oic.oauth2.provider:DEBUG Redirected to: 'https://localhost:8091/?state=STATE0&code=kbq%2FIWANUaxg5PznPPlB4326L0t%2FNFMLU3yJNdcXOe0RLSAP0zTpQMqFSD%2FUGecy&upm_answer=true' (<type 'str'>)
2013-05-24 15:38:43,803 oicServer:INFO callback: <oic.oic.provider.TokenEndpoint object at 0x104abae10>
2013-05-24 15:38:44,504 oic.oauth2.provider:DEBUG - token -
2013-05-24 15:38:44,504 oic.oauth2.provider:DEBUG body: code=kbq%2FIWANUaxg5PznPPlB4326L0t%2FNFMLU3yJNdcXOe0RLSAP0zTpQMqFSD%2FUGecy&grant_type=authorization_code&client_id=JOVPpP2srljq&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F
2013-05-24 15:38:56,681 oic.oauth2.provider:DEBUG REQ: {'redirect_uri': 'https://localhost:8091/', 'code': 'kbq/IWANUaxg5PznPPlB4326L0t/NFMLU3yJNdcXOe0RLSAP0zTpQMqFSD/UGecy', 'client_id': 'JOVPpP2srljq', 'grant_type': 'authorization_code'}
2013-05-24 15:38:56,681 oic.oauth2.provider:DEBUG Unknown client_id
2013-05-24 15:39:18,166 root:DEBUG URLS: '[('^verify', <function verify at 0x1035b0140>), ('.+\\.css$', <function css at 0x1035aff50>), ('safe', <function safe at 0x1035afed8>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x1035badd0>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x1035bae10>)]
2013-05-24 15:39:18,167 root:INFO OC server starting listening on port:8092
2013-05-24 15:39:23,856 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x1035badd0>
2013-05-24 15:39:24,967 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:39:24,967 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'
2013-05-24 15:39:24,968 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq', 'login': '', 'password': ''}
2013-05-24 15:39:25,503 oicServer:INFO callback: <function verify at 0x1035b0140>
2013-05-24 15:39:26,754 oic.utils.authn.user:DEBUG verify(query=state%3DSTATE0%26redirect_uri%3Dhttps%253A%252F%252Flocalhost%253A8091%252F%26response_type%3Dcode%26client_id%3DJOVPpP2srljq&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:39:26,754 oic.utils.authn.user:DEBUG dict: {'query': ['state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq'], 'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:39:26,755 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:39:26,756 oic.utils.authn.user:DEBUG kwargs: {'state': ['STATE0'], 'redirect_uri': ['https://localhost:8091/'], 'response_type': ['code'], 'client_id': ['JOVPpP2srljq'], 'upm_answer': 'true'}
2013-05-24 15:39:27,649 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x1035badd0>
2013-05-24 15:39:29,105 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:39:29,105 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=JOVPpP2srljq&upm_answer=true'
2013-05-24 15:39:29,105 oic.utils.authn.user:DEBUG kwargs: {}
2013-05-24 15:39:29,106 oic.oauth2.provider:DEBUG - authenticated -
2013-05-24 15:39:29,848 oic.oauth2.provider:DEBUG code: 'fLV1tTwtyp11CVQtiKwA3YpQ4NxgwjU/U2/7t0RBx5n7DvtNb+4/d4VSxLBUvMZL'
2013-05-24 15:39:29,850 oic.oauth2.provider:DEBUG Redirected to: 'https://localhost:8091/?state=STATE0&code=fLV1tTwtyp11CVQtiKwA3YpQ4NxgwjU%2FU2%2F7t0RBx5n7DvtNb%2B4%2Fd4VSxLBUvMZL&upm_answer=true' (<type 'str'>)
2013-05-24 15:39:30,610 oicServer:INFO callback: <oic.oic.provider.TokenEndpoint object at 0x1035bae10>
2013-05-24 15:39:31,305 oic.oauth2.provider:DEBUG - token -
2013-05-24 15:39:31,305 oic.oauth2.provider:DEBUG body: code=fLV1tTwtyp11CVQtiKwA3YpQ4NxgwjU%2FU2%2F7t0RBx5n7DvtNb%2B4%2Fd4VSxLBUvMZL&grant_type=authorization_code&client_id=JOVPpP2srljq&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F
2013-05-24 15:39:56,902 oic.oauth2.provider:DEBUG REQ: {'redirect_uri': 'https://localhost:8091/', 'code': 'fLV1tTwtyp11CVQtiKwA3YpQ4NxgwjU/U2/7t0RBx5n7DvtNb+4/d4VSxLBUvMZL', 'client_id': 'JOVPpP2srljq', 'grant_type': 'authorization_code'}
2013-05-24 15:40:35,544 oic.oauth2.provider:DEBUG Unknown client_id
2013-05-24 15:43:09,515 root:DEBUG URLS: '[('^verify', <function verify at 0x101801668>), ('.+\\.css$', <function css at 0x101801500>), ('safe', <function safe at 0x101801488>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x1018185d0>)]
2013-05-24 15:43:09,516 root:INFO OC server starting listening on port:8092
2013-05-24 15:43:15,507 root:DEBUG URLS: '[('^verify', <function verify at 0x101801668>), ('.+\\.css$', <function css at 0x101801500>), ('safe', <function safe at 0x101801488>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x1018185d0>)]
2013-05-24 15:43:15,507 root:INFO OC server starting listening on port:8092
2013-05-24 15:43:17,614 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>
2013-05-24 15:43:17,614 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:43:17,615 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=5pOGKpoC2eab'
2013-05-24 15:43:17,615 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=5pOGKpoC2eab', 'login': '', 'password': ''}
2013-05-24 15:43:17,645 oicServer:INFO callback: <function verify at 0x101801668>
2013-05-24 15:43:17,645 oic.utils.authn.user:DEBUG verify(query=state%3DSTATE0%26redirect_uri%3Dhttps%253A%252F%252Flocalhost%253A8091%252F%26response_type%3Dcode%26client_id%3D5pOGKpoC2eab&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:43:17,645 oic.utils.authn.user:DEBUG dict: {'query': ['state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=5pOGKpoC2eab'], 'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:43:17,645 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:43:17,646 oic.utils.authn.user:DEBUG kwargs: {'state': ['STATE0'], 'redirect_uri': ['https://localhost:8091/'], 'response_type': ['code'], 'client_id': ['5pOGKpoC2eab'], 'upm_answer': 'true'}
2013-05-24 15:43:17,675 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>
2013-05-24 15:43:17,675 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:43:17,675 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=5pOGKpoC2eab&upm_answer=true'
2013-05-24 15:43:17,675 oic.utils.authn.user:DEBUG kwargs: {}
2013-05-24 15:43:17,675 oic.oauth2.provider:DEBUG - authenticated -
2013-05-24 15:43:17,676 oic.oauth2.provider:DEBUG code: 'wnmsf15/skj+BV9ICCLxEIJrm8jjmcgZ/ntDoVlYRPI9PVl0lPbfPbGZqBr9dijk'
2013-05-24 15:43:17,676 oic.oauth2.provider:DEBUG Redirected to: 'https://localhost:8091/?state=STATE0&code=wnmsf15%2Fskj%2BBV9ICCLxEIJrm8jjmcgZ%2FntDoVlYRPI9PVl0lPbfPbGZqBr9dijk&upm_answer=true' (<type 'str'>)
2013-05-24 15:43:17,704 oicServer:INFO callback: <oic.oic.provider.TokenEndpoint object at 0x1018185d0>
2013-05-24 15:43:17,704 oic.oauth2.provider:DEBUG - token -
2013-05-24 15:43:17,704 oic.oauth2.provider:DEBUG body: code=wnmsf15%2Fskj%2BBV9ICCLxEIJrm8jjmcgZ%2FntDoVlYRPI9PVl0lPbfPbGZqBr9dijk&grant_type=authorization_code&client_id=5pOGKpoC2eab&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F
2013-05-24 15:43:17,705 oic.oauth2.provider:DEBUG REQ: {'redirect_uri': 'https://localhost:8091/', 'code': 'wnmsf15/skj+BV9ICCLxEIJrm8jjmcgZ/ntDoVlYRPI9PVl0lPbfPbGZqBr9dijk', 'client_id': '5pOGKpoC2eab', 'grant_type': 'authorization_code'}
2013-05-24 15:43:17,705 oic.utils.authn.client:DEBUG Verified Client ID: 5pOGKpoC2eab
2013-05-24 15:43:17,705 oic.oauth2.provider:DEBUG AccessTokenRequest: code=wnmsf15%2Fskj%2BBV9ICCLxEIJrm8jjmcgZ%2FntDoVlYRPI9PVl0lPbfPbGZqBr9dijk&grant_type=authorization_code&client_id=5pOGKpoC2eab&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F
2013-05-24 15:43:17,705 oic.oauth2.provider:DEBUG _tinfo: {'client_id_issued_at': 1369399397, 'code': 'wnmsf15/skj+BV9ICCLxEIJrm8jjmcgZ/ntDoVlYRPI9PVl0lPbfPbGZqBr9dijk', 'authzreq': '{"state": "STATE0", "redirect_uri": "https://localhost:8091/", "response_type": "code", "client_id": "5pOGKpoC2eab", "upm_answer": "true"}', 'permission': '', 'token_type': 'Bearer', 'local_sub': 'diana', 'client_id': '5pOGKpoC2eab', 'oauth_state': 'token', 'refresh_token': 'wnmsf15/skj+BV9ICCLxEO7SfkzgYWalbrKSGOTiz+LRTaE7LXFtf4SZiewE+VAN', 'revoked': False, 'sub': 'diana', 'access_token': 'wnmsf15/skj+BV9ICCLxEK7AwWvLUTL9p3uKYK5J+penkRjYDOkzKT4W4tZmroQt', 'expires_in': 3600, 'state': 'STATE0', 'redirect_uri': 'https://localhost:8091/', 'code_used': True, 'access_token_scope': '?', 'client_secret_expires_at': 1369402997}
2013-05-24 15:43:17,705 oic.oauth2.provider:DEBUG AccessTokenResponse: access_token=wnmsf15%2Fskj%2BBV9ICCLxEK7AwWvLUTL9p3uKYK5J%2BpenkRjYDOkzKT4W4tZmroQt&token_type=Bearer&state=STATE0&expires_in=3600&refresh_token=wnmsf15%2Fskj%2BBV9ICCLxEO7SfkzgYWalbrKSGOTiz%2BLRTaE7LXFtf4SZiewE%2BVAN
2013-05-24 15:48:59,518 root:DEBUG URLS: '[('^verify', <function verify at 0x101801668>), ('.+\\.css$', <function css at 0x101801500>), ('safe', <function safe at 0x101801488>), ('^authorization', <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>), ('^token', <oic.oic.provider.TokenEndpoint object at 0x1018185d0>)]
2013-05-24 15:48:59,518 root:INFO OC server starting listening on port:8092
2013-05-24 15:49:01,978 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>
2013-05-24 15:49:01,978 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:49:01,978 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=5pOGKpoC2eab'
2013-05-24 15:49:01,978 oic.utils.authn.user:INFO do_authentication argv: {'logo_url': None, 'policy_url': None, 'action': 'verify', 'query': 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=5pOGKpoC2eab', 'login': '', 'password': ''}
2013-05-24 15:49:02,008 oicServer:INFO callback: <function verify at 0x101801668>
2013-05-24 15:49:02,008 oic.utils.authn.user:DEBUG verify(query=state%3DSTATE0%26redirect_uri%3Dhttps%253A%252F%252Flocalhost%253A8091%252F%26response_type%3Dcode%26client_id%3D5pOGKpoC2eab&login=diana&password=krall&form.commit=Log+In)
2013-05-24 15:49:02,009 oic.utils.authn.user:DEBUG dict: {'query': ['state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=5pOGKpoC2eab'], 'login': ['diana'], 'password': ['krall'], 'form.commit': ['Log In']}
2013-05-24 15:49:02,009 oic.utils.authn.user:DEBUG passwd: {'diana': 'krall', 'upper': 'crust', 'babs': 'howes', 'rohe0002': 'StevieRay', 'haho0032': 'qwerty'}
2013-05-24 15:49:02,009 oic.utils.authn.user:DEBUG kwargs: {'state': ['STATE0'], 'redirect_uri': ['https://localhost:8091/'], 'response_type': ['code'], 'client_id': ['5pOGKpoC2eab'], 'upm_answer': 'true'}
2013-05-24 15:49:02,038 oicServer:INFO callback: <oic.oic.provider.AuthorizationEndpoint object at 0x101818590>
2013-05-24 15:49:02,038 oic.oauth2.provider:DEBUG - authorization -
2013-05-24 15:49:02,038 oic.oauth2.provider:DEBUG Query: 'state=STATE0&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F&response_type=code&client_id=5pOGKpoC2eab&upm_answer=true'
2013-05-24 15:49:02,038 oic.utils.authn.user:DEBUG kwargs: {}
2013-05-24 15:49:02,038 oic.oauth2.provider:DEBUG - authenticated -
2013-05-24 15:49:02,039 oic.oauth2.provider:DEBUG code: 'FCrebMG43BGLLmy7DqtH8xRceK7HBSK/R0S4hoYm3XPZ+6VZ4vkwf2AcLtq5MAC6'
2013-05-24 15:49:02,039 oic.oauth2.provider:DEBUG Redirected to: 'https://localhost:8091/?state=STATE0&code=FCrebMG43BGLLmy7DqtH8xRceK7HBSK%2FR0S4hoYm3XPZ%2B6VZ4vkwf2AcLtq5MAC6&upm_answer=true' (<type 'str'>)
2013-05-24 15:49:02,066 oicServer:INFO callback: <oic.oic.provider.TokenEndpoint object at 0x1018185d0>
2013-05-24 15:49:02,066 oic.oauth2.provider:DEBUG - token -
2013-05-24 15:49:02,066 oic.oauth2.provider:DEBUG body: code=FCrebMG43BGLLmy7DqtH8xRceK7HBSK%2FR0S4hoYm3XPZ%2B6VZ4vkwf2AcLtq5MAC6&grant_type=authorization_code&client_id=5pOGKpoC2eab&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F
2013-05-24 15:49:02,067 oic.oauth2.provider:DEBUG REQ: {'redirect_uri': 'https://localhost:8091/', 'code': 'FCrebMG43BGLLmy7DqtH8xRceK7HBSK/R0S4hoYm3XPZ+6VZ4vkwf2AcLtq5MAC6', 'client_id': '5pOGKpoC2eab', 'grant_type': 'authorization_code'}
2013-05-24 15:49:02,067 oic.utils.authn.client:DEBUG Verified Client ID: 5pOGKpoC2eab
2013-05-24 15:49:02,067 oic.oauth2.provider:DEBUG AccessTokenRequest: code=FCrebMG43BGLLmy7DqtH8xRceK7HBSK%2FR0S4hoYm3XPZ%2B6VZ4vkwf2AcLtq5MAC6&grant_type=authorization_code&client_id=5pOGKpoC2eab&redirect_uri=https%3A%2F%2Flocalhost%3A8091%2F
2013-05-24 15:49:02,067 oic.oauth2.provider:DEBUG _tinfo: {'client_id_issued_at': 1369399742, 'code': 'FCrebMG43BGLLmy7DqtH8xRceK7HBSK/R0S4hoYm3XPZ+6VZ4vkwf2AcLtq5MAC6', 'authzreq': '{"state": "STATE0", "redirect_uri": "https://localhost:8091/", "response_type": "code", "client_id": "5pOGKpoC2eab", "upm_answer": "true"}', 'permission': '', 'token_type': 'Bearer', 'local_sub': 'diana', 'client_id': '5pOGKpoC2eab', 'oauth_state': 'token', 'refresh_token': 'FCrebMG43BGLLmy7DqtH867b6Z96JW5FpI78fGj3iXXJ+B08keAFuvTJfUdAdClJ', 'revoked': False, 'sub': 'diana', 'access_token': 'FCrebMG43BGLLmy7DqtH8yjTT6XsIlQW8dfFCmTV5BajRQiDgtwj/UQewaxyDrjL', 'expires_in': 3600, 'state': 'STATE0', 'redirect_uri': 'https://localhost:8091/', 'code_used': True, 'access_token_scope': '?', 'client_secret_expires_at': 1369403342}
2013-05-24 15:49:02,067 oic.oauth2.provider:DEBUG AccessTokenResponse: access_token=FCrebMG43BGLLmy7DqtH8yjTT6XsIlQW8dfFCmTV5BajRQiDgtwj%2FUQewaxyDrjL&token_type=Bearer&state=STATE0&expires_in=3600&refresh_token=FCrebMG43BGLLmy7DqtH867b6Z96JW5FpI78fGj3iXXJ%2BB08keAFuvTJfUdAdClJ

View File

@ -1,361 +0,0 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
import traceback
from exceptions import KeyError
from exceptions import Exception
from exceptions import OSError
from exceptions import IndexError
from exceptions import AttributeError
from exceptions import KeyboardInterrupt
from oic.utils.authn.client import verify_client
from oic.utils.authz import AuthzHandling
from oic.utils.userinfo import UserInfo
__author__ = 'rohe0002'
import logging
import re
from oic.utils import http_util
from oic.oauth2.provider import Provider
from oic.utils.http_util import *
from mako.lookup import TemplateLookup
LOGGER = logging.getLogger("")
LOGFILE_NAME = 'oa.log'
hdlr = logging.FileHandler(LOGFILE_NAME)
base_formatter = logging.Formatter(
"%(asctime)s %(name)s:%(levelname)s %(message)s")
hdlr.setFormatter(base_formatter)
LOGGER.addHandler(hdlr)
LOGGER.setLevel(logging.DEBUG)
URLMAP = {}
NAME = "pyoic"
OAS = None
PASSWD = {"diana": "krall",
"babs": "howes",
"upper": "crust",
"rohe0002": "StevieRay",
"haho0032": "qwerty"}
#noinspection PyUnusedLocal
def devnull(txt):
pass
# ----------------------------------------------------------------------------
#noinspection PyUnusedLocal
def safe(environ, start_response, logger):
_oas = environ["oic.oas"]
_srv = _oas.server
_log_info = _oas.logger.info
_log_info("- safe -")
#_log_info("env: %s" % environ)
#_log_info("handle: %s" % (handle,))
try:
authz = environ["HTTP_AUTHORIZATION"]
(typ, code) = authz.split(" ")
assert typ == "Bearer"
except KeyError:
resp = BadRequest("Missing authorization information")
return resp(environ, start_response)
try:
_sinfo = _srv.sdb[code]
except KeyError:
resp = Unauthorized("Not authorized")
return resp(environ, start_response)
info = "'%s' secrets" % _sinfo["user_id"]
resp = Response(info)
return resp(environ, start_response)
#noinspection PyUnusedLocal
def css(environ, start_response, logger):
try:
info = open(environ["PATH_INFO"]).read()
resp = Response(info)
except OSError:
resp = NotFound(environ["PATH_INFO"])
return resp(environ, start_response)
# ----------------------------------------------------------------------------
#noinspection PyUnusedLocal
def token(environ, start_response, logger):
_oas = environ["oic.oas"]
return wsgi_wrapper(environ, start_response, _oas.token_endpoint,
logger=logger)
#noinspection PyUnusedLocal
def authorization(environ, start_response, logger):
_oas = environ["oic.oas"]
return wsgi_wrapper(environ, start_response, _oas.authorization_endpoint,
logger=logger)
#noinspection PyUnusedLocal
def verify(environ, start_response, logger):
_oas = environ["oic.oas"]
return wsgi_wrapper(environ, start_response, _oas.authn.verify,
logger=logger)
def static_file(path):
try:
os.stat(path)
return True
except OSError:
return False
#noinspection PyUnresolvedReferences
def static(environ, start_response, logger, path):
logger.info("[static]sending: %s" % (path,))
try:
text = open(path).read()
if path.endswith(".ico"):
start_response('200 OK', [('Content-Type', "image/x-icon")])
elif path.endswith(".html"):
start_response('200 OK', [('Content-Type', 'text/html')])
elif path.endswith(".json"):
start_response('200 OK', [('Content-Type', 'application/json')])
elif path.endswith(".txt"):
start_response('200 OK', [('Content-Type', 'text/plain')])
elif path.endswith(".css"):
start_response('200 OK', [('Content-Type', 'text/css')])
else:
start_response('200 OK', [('Content-Type', "text/xml")])
return [text]
except IOError:
resp = NotFound()
return resp(environ, start_response)
# ----------------------------------------------------------------------------
from oic.oic.provider import AuthorizationEndpoint
from oic.oic.provider import TokenEndpoint
ENDPOINTS = [
AuthorizationEndpoint(authorization),
TokenEndpoint(token),
]
URLS = [
(r'^verify', verify),
(r'.+\.css$', css),
(r'safe', safe),
# (r'tracelog', trace_log),
]
def add_endpoints(extra):
global URLS
for endp in extra:
URLS.append(("^%s" % endp.etype, endp))
# ----------------------------------------------------------------------------
ROOT = './'
LOOKUP = TemplateLookup(directories=[ROOT + 'templates', ROOT + 'htdocs'],
module_directory=ROOT + 'modules',
input_encoding='utf-8', output_encoding='utf-8')
# ----------------------------------------------------------------------------
def application(environ, start_response):
"""
The main WSGI application. Dispatch the current request to
the functions from above and store the regular expression
captures in the WSGI environment as `oic.url_args` so that
the functions from above can access the url placeholders.
If nothing matches call the `not_found` function.
:param environ: The HTTP application environment
:param start_response: The application to run when the handling of the
request is done
:return: The response as a list of lines
"""
global OAS
#user = environ.get("REMOTE_USER", "")
path = environ.get('PATH_INFO', '').lstrip('/')
logger = logging.getLogger('oicServer')
if path == "robots.txt":
return static(environ, start_response, logger, "static/robots.txt")
environ["oic.oas"] = OAS
#remote = environ.get("REMOTE_ADDR")
#kaka = environ.get("HTTP_COOKIE", '')
if path.startswith("static/"):
return static(environ, start_response, logger, path)
# elif path.startswith("oc_keys/"):
# return static(environ, start_response, logger, path)
for regex, callback in URLS:
match = re.search(regex, path)
if match is not None:
try:
environ['oic.url_args'] = match.groups()[0]
except IndexError:
environ['oic.url_args'] = path
logger.info("callback: %s" % callback)
try:
return callback(environ, start_response, logger)
except Exception, err:
print >> sys.stderr, "%s" % err
message = traceback.format_exception(*sys.exc_info())
print >> sys.stderr, message
logger.exception("%s" % err)
resp = ServiceError("%s" % err)
return resp(environ, start_response)
LOGGER.debug("unknown side: %s" % path)
resp = NotFound("Couldn't find the side you asked for!")
return resp(environ, start_response)
# ----------------------------------------------------------------------------
if __name__ == '__main__':
import argparse
import shelve
import importlib
from cherrypy import wsgiserver
#from cherrypy.wsgiserver import ssl_builtin
from cherrypy.wsgiserver import ssl_pyopenssl
from oic.utils.sdb import SessionDB
parser = argparse.ArgumentParser()
parser.add_argument('-v', dest='verbose', action='store_true')
parser.add_argument('-d', dest='debug', action='store_true')
parser.add_argument('-p', dest='port', default=80, type=int)
parser.add_argument('-t', dest='test', action='store_true')
parser.add_argument('-X', dest='XpressConnect', action='store_true')
parser.add_argument('-A', dest='authn_as', default="")
parser.add_argument('-P', dest='provider_conf')
parser.add_argument(dest="config")
args = parser.parse_args()
# Client data base
cdb = shelve.open("client_db", writeback=True)
config = importlib.import_module(args.config)
config.issuer = config.issuer % args.port
config.SERVICE_URL = config.SERVICE_URL % args.port
if config.AUTHN == 'CasAuthnMethod':
from oic.utils.authn.user_cas import CasAuthnMethod
from oic.utils.authn.ldap_member import UserLDAPMemberValidation
config.LDAP_EXTRAVALIDATION.update(config.LDAP)
authn = CasAuthnMethod(
None, config.CAS_SERVER, config.SERVICE_URL,
"%s/authorization" % config.issuer,
UserLDAPMemberValidation(**config.LDAP_EXTRAVALIDATION))
else:
from oic.utils.authn.user import UsernamePasswordMako
authn = UsernamePasswordMako(None, "login.mako", LOOKUP, PASSWD,
"%s/authorization" % config.issuer)
# dealing with authorization
authz = AuthzHandling()
# User info database
OAS = Provider(config.issuer, SessionDB(), cdb, authn, authz,
verify_client, config.SYM_KEY)
authn.srv = OAS
try:
OAS.cookie_ttl = config.COOKIETTL
except AttributeError:
pass
try:
OAS.cookie_name = config.COOKIENAME
except AttributeError:
pass
OAS.cookie_func = http_util.make_cookie
#print URLS
if args.debug:
OAS.debug = True
if args.test:
OAS.test_mode = True
else:
OAS.test_mode = False
if args.authn_as:
OAS.authn_as = args.authn_as
endpoints = ENDPOINTS
add_endpoints(endpoints)
OAS.endpoints = endpoints
if args.port == 80:
OAS.baseurl = config.baseurl
else:
if config.baseurl.endswith("/"):
config.baseurl = config.baseurl[:-1]
OAS.baseurl = "%s:%d" % (config.baseurl, args.port)
if not OAS.baseurl.endswith("/"):
OAS.baseurl += "/"
if config.USERINFO == "LDAP":
from oic.utils.userinfo.ldap_info import UserInfoLDAP
OAS.userinfo = UserInfoLDAP(**config.LDAP)
elif config.USERINFO == "SIMPLE":
OAS.userinfo = UserInfo(config.DISTDB)
elif config.USERINFO == "DISTRIBUTED":
from oic.utils.userinfo.distaggr import DistributedAggregatedUserInfo
OAS.userinfo = DistributedAggregatedUserInfo(config.USERDB, OAS,
config.CLIENT_INFO)
LOGGER.debug("URLS: '%s" % (URLS,))
# Add the claims providers keys
SRV = wsgiserver.CherryPyWSGIServer(('0.0.0.0', args.port), application)
SRV.ssl_adapter = ssl_pyopenssl.pyOpenSSLAdapter(config.SERVER_CERT,
config.SERVER_KEY,
config.CERT_CHAIN)
LOGGER.info("OC server starting listening on port:%s" % args.port)
try:
SRV.start()
except KeyboardInterrupt:
SRV.stop()

View File

@ -1,93 +0,0 @@
# -*- coding: utf-8 -*-
baseurl = "https://localhost"
#baseurl = "https://lingon.ladok.umu.se"
issuer = "%s:%%d" % baseurl
# keys = {
# "rsa": {
# "key": "oc_keys/key.pem",
# "usage": ["enc", "sig"]
# }
# }
# ..... If you want to use CAS authentication ....
#AUTHN = "CasAuthnMethod"
CAS_SERVER = "https://cas.umu.se"
SERVICE_URL = "%s/verify" % issuer
# ..... Otherwise
AUTHN = "Simple"
COOKIENAME= 'pyoic'
COOKIETTL = 4*60 # 4 hours
SYM_KEY = "SoLittleTime,GotToHurry"
SERVER_CERT = "certs/server.crt"
SERVER_KEY = "certs/server.key"
#CERT_CHAIN="certs/chain.pem"
CERT_CHAIN = None
# ======= SIMPLE DATABASE ==============
USERDB = {
"diana": {
"user_id": "dikr0001",
"name": "Diana Krall",
"given_name": "Diana",
"family_name": "Krall",
"nickname": "Dina",
"email": "diana@example.org",
"email_verified": False,
"phone_number": "+46 90 7865000",
"address": {
"street_address": "Umeå Universitet",
"locality": "Umeå",
"postal_code": "SE-90187",
"country": "Sweden"
},
},
"babs": {
"user_id": "babs0001",
"name": "Barbara J Jensen",
"given_name": "Barbara",
"family_name": "Jensen",
"nickname": "babs",
"email": "babs@example.com",
"email_verified": True,
"address": {
"street_address": "100 Universal City Plaza",
"locality": "Hollywood",
"region": "CA",
"postal_code": "91608",
"country": "USA",
},
},
"upper": {
"user_id": "uppe0001",
"name": "Upper Crust",
"given_name": "Upper",
"family_name": "Crust",
"email": "uc@example.com",
"email_verified": True,
}
}
DISTDB = USERDB.copy()
# ============= LDAP ==============
LDAP = {
"uri": "ldaps://ldap.umu.se",
"base": "dc=umu, dc=se",
"filter_pattern": "(uid=%s)",
"user": "",
"passwd": "",
"attr": ["eduPersonScopedAffiliation", "eduPersonAffiliation"],
}
LDAP_EXTRAVALIDATION = {
"verifyAttr": "eduPersonAffiliation",
"verifyAttrValid": ['employee', 'staff', 'student']
}
#USERINFO = "LDAP"
USERINFO = "SIMPLE"

View File

@ -0,0 +1 @@
__author__ = 'roland'

28
oauth_example/rp/conf.py Normal file
View File

@ -0,0 +1,28 @@
from mako.lookup import TemplateLookup
PORT = 8666
HOST = "localhost"
BASE = "http://%s:%d/" % (HOST, PORT)
# If BASE is https these has to be specified
SERVER_KEY = ''
SERVER_CERT = ''
CA_BUNDLE = None
SCOPE = []
ROOT = "./"
LOOKUP = TemplateLookup(directories=[ROOT + 'templates', ROOT + 'htdocs'],
module_directory=ROOT + 'modules',
input_encoding='utf-8', output_encoding='utf-8')
AS_CONF = {
"AuthzServer@DIG": {
"authorization_endpoint": "https://localhost:8080/authorization",
"token_endpoint": "https://localhost:8080/token",
"client_id": "YWwQiwQNWaeI",
"client_secret": "cdb8c2f40110a5fdefe7e26ea26a0bd51fb3d1b9593d6a054c75abcb"
}
}

View File

@ -0,0 +1,51 @@
<%!
def as_choice(as_list):
"""
Creates a dropdown list of authorization servers
"""
element = "<select name=\"authzsrv\">"
for name in as_list:
element += "<option value=\"%s\">%s</option>" % (name, name)
element += "</select>"
return element
%>
<html>
<head>
<title>OAuth2 RP Example</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="static/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="static/style.css" rel="stylesheet" media="all">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="../../assets/js/html5shiv.js"></script>
<script src="../../assets/js/respond.min.js"></script>
<style type="text/css">
tbody tr:nth-child(odd){ background-color:#ccc; }
</style>
<![endif]-->
</head>
<body>
<div class="container">
<!-- Main component for a primary marketing message or call to action -->
<div class="jumbotron">
<form action="${action}" method="${method}">
<h3>Choose the Authorization Server: </h3>
${as_choice(as_list)}
<hr>
<br>
<input type="submit" name="commit" value="select"/>
</form>
</div>
</div> <!-- /container -->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="/static/jquery.min.1.9.1.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/static/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,2 @@
<%inherit file="root.mako" />
<%def name="title()">Log out done</%def>

182
oauth_example/rp/rp.py Normal file
View File

@ -0,0 +1,182 @@
import importlib
from urllib import unquote
from urlparse import parse_qs
import argparse
import sys
from beaker.middleware import SessionMiddleware
from cherrypy import wsgiserver
from oic.oauth2.consumer import Consumer
from oic.utils.http_util import NotFound
from oic.utils.http_util import Response
from oic.utils.http_util import Redirect
from oic.utils.http_util import get_or_post
import logging
# ============================================================================
# First define how logging is supposed to be done
# ============================================================================
LOGGER = logging.getLogger("")
LOGFILE_NAME = 'rp.log'
hdlr = logging.FileHandler(LOGFILE_NAME)
base_formatter = logging.Formatter(
"%(asctime)s %(name)s:%(levelname)s %(message)s")
hdlr.setFormatter(base_formatter)
LOGGER.addHandler(hdlr)
LOGGER.setLevel(logging.INFO)
SERVER_ENV = {}
RP = None
RP_CONF = None
CONSUMER = {}
#class Httpd(object):
# def http_request(self, url):
# return requests.get(url, verify=False)
# ============================================================================
# Endpoint functions
# ============================================================================
def as_choice(environ, start_response):
resp = Response(mako_template="as_choice.mako",
template_lookup=RP_CONF.LOOKUP,
headers=[])
argv = {
"as_list": RP_CONF.AS_CONF.keys(),
"action": "as",
"method": "POST"
}
return resp(environ, start_response, **argv)
#noinspection PyUnresolvedReferences
def static(environ, start_response, path):
LOGGER.info("[static]sending: %s" % (path,))
try:
text = open(path).read()
if path.endswith(".ico"):
start_response('200 OK', [('Content-Type', "image/x-icon")])
elif path.endswith(".html"):
start_response('200 OK', [('Content-Type', 'text/html')])
elif path.endswith(".json"):
start_response('200 OK', [('Content-Type', 'application/json')])
elif path.endswith(".txt"):
start_response('200 OK', [('Content-Type', 'text/plain')])
elif path.endswith(".css"):
start_response('200 OK', [('Content-Type', 'text/css')])
else:
start_response('200 OK', [('Content-Type', "text/xml")])
return [text]
except IOError:
resp = NotFound()
return resp(environ, start_response)
# ============================================================================
# The main web server function
# ============================================================================
Token = {}
def application(environ, start_response):
session = environ['beaker.session']
path = environ.get('PATH_INFO', '').lstrip('/')
if path == "robots.txt":
return static(environ, start_response, "static/robots.txt")
if path.startswith("static/"):
return static(environ, start_response, path)
if path == "logout":
session.invalidate()
resp = Redirect("static/log_out_message.html")
return resp(environ, start_response)
if path == "as":
session["callback"] = True
request = parse_qs(get_or_post(environ))
_cli = CONSUMER[unquote(request["authzsrv"][0])]
session["client"] = _cli
resp = Redirect(_cli.begin(RP_CONF.BASE, path))
return resp(environ, start_response)
if path == "authz_cb":
_cli = session["client"]
request = get_or_post(environ)
aresp = _cli.handle_authorization_response(request)
rargs = {"code": aresp["code"]}
atresp = _cli.do_access_token_request(request_args=rargs)
#extra_args=None, http_args=None,)
# Access token should be stored somewhere for later usage
Token[atresp["state"]] = atresp
resp = Response("Got access token: %s" % atresp["access_token"])
return resp(environ, start_response)
return as_choice(environ, start_response)
# ============================================================================
# Below is what's needed to start the server
# ============================================================================
START_MESG = "OAuth2 relaying party listening on port:%s at %s"
if __name__ == '__main__':
session_opts = {
'session.type': 'memory',
'session.cookie_expires': True,
#'session.data_dir': './data',
'session.auto': True,
'session.timeout': 900
}
parser = argparse.ArgumentParser()
parser.add_argument('-c', dest='conf_path')
parser.add_argument(dest="config")
args = parser.parse_args()
# Load the configuration file, which must be a python file
# The default; first look for it in the directory from where this program
# is run.
sys.path.insert(0, ".")
# If a specific configuration directory is specified look there first
if args.conf_path:
sys.path.insert(0, args.conf_path)
RP_CONF = importlib.import_module(args.config)
# per AS instantiate a consumer
for name, info in RP_CONF.AS_CONF.items():
c_conf = {"client_id": info["client_id"]}
CONSUMER[name] = Consumer(
session_db={}, client_config=c_conf,
server_info={
"authorization_endpoint": info["authorization_endpoint"],
"token_endpoint": info["token_endpoint"]},
authz_page="authz_cb", response_type="code")
CONSUMER[name].client_secret = info["client_secret"]
SRV = wsgiserver.CherryPyWSGIServer(('0.0.0.0', RP_CONF.PORT),
SessionMiddleware(application,
session_opts))
if RP_CONF.BASE.startswith("https"):
from cherrypy.wsgiserver import ssl_pyopenssl
SRV.ssl_adapter = ssl_pyopenssl.pyOpenSSLAdapter(
RP_CONF.SERVER_CERT, RP_CONF.SERVER_KEY, RP_CONF.CA_BUNDLE)
LOGGER.info(START_MESG % (RP_CONF.HOST, RP_CONF.PORT))
print START_MESG % (RP_CONF.HOST, RP_CONF.PORT)
try:
SRV.start()
except KeyboardInterrupt:
SRV.stop()

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
User-agent: *
Disallow: /

View File

@ -0,0 +1,4 @@
body {
min-height: 2000px;
padding-top: 70px;
}

View File

@ -0,0 +1,37 @@
<% self.seen_css = set() %>
<%def name="css_link(path, media='')" filter="trim">
% if path not in self.seen_css:
<link rel="stylesheet" type="text/css" href="${path|h}" media="${media}">
% endif
<% self.seen_css.add(path) %>
</%def>
<%def name="css()" filter="trim">
${css_link('/css/main.css', 'screen')}
</%def>
<%def name="pre()" filter="trim">
<div class="header">
<h1><a href="/">Login</a></h1>
</div>
</%def>
<%def name="post()" filter="trim">
<div>
<div class="footer">
<p>&#169; Copyright 2011 Ume&#229; Universitet &nbsp;</p>
</div>
</div>
</%def>
##<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN "
##"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head><title>OAuth test</title>
${self.css()}
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
${pre()}
## ${comps.dict_to_table(pageargs)}
## <hr><hr>
${next.body()}
${post()}
</body>
</html>

View File

@ -505,7 +505,7 @@ if __name__ == '__main__':
if "UserPassword" == authkey:
from oic.utils.authn.user import UsernamePasswordMako
authn = UsernamePasswordMako(None, "login.mako", LOOKUP, PASSWD,
"%s/authorization" % config.issuer)
"%s/authorization" % config.issuer)
if authn is not None:
ac.add(config.AUTHORIZATION[authkey]["ACR"],
authn,

View File

@ -14,4 +14,4 @@ ME = {
"contacts": ["ops@example.com"],
}
SCOPE = ["openid", "profile", "email", "address", "phone"]
SCOPE = ["openid", "profile", "email", "address", "phone"]

View File

@ -211,8 +211,8 @@ def application(environ, start_response):
if path == "rpAcr":
return chooseAcrValue(environ, start_response, session)
if path == "rpAuth": #Only called if multiple arc_values (that is
# authentications) exists.
if path == "rpAuth":
# Only called if multiple arc_values (that is authentications) exists.
if "acr" in query and query["acr"][0] in session.getAcrvalues():
func = getattr(RP, "create_authnrequest")
return func(environ, SERVER_ENV, start_response, session,

View File

@ -171,7 +171,7 @@ class Consumer(Client):
self.sdb[sid] = res
#noinspection PyUnusedLocal,PyArgumentEqualDefault
def begin(self, baseurl, request, response_type="code", **kwargs):
def begin(self, baseurl, request, response_type="", **kwargs):
""" Begin the OAuth2 flow
:param baseurl: The RPs base
@ -197,6 +197,12 @@ class Consumer(Client):
self._backup(sid)
self.sdb["seed:%s" % self.seed] = sid
if not response_type:
if self.response_type:
response_type = self.response_type
else:
self.response_type = response_type = "code"
location = self.request_info(
AuthorizationRequest, method="GET", scope=self.scope,
request_args={"state": sid, "response_type": response_type})[0]

View File

@ -601,3 +601,13 @@ class Provider(object):
return Response(atr.to_json(), content="application/json")
def verify_endpoint(self, request="", cookie=None, **kwargs):
_req = urlparse.parse_qs(request)
try:
areq = urlparse.parse_qs(_req["query"][0])
except KeyError:
return BadRequest()
authn, acr = self.pick_auth(areq=areq)
kwargs["cookie"] = cookie
return authn.verify(_req, **kwargs)

View File

@ -24,25 +24,31 @@ class CasAuthnMethod(UserAuthnMethod):
CONST_TICKET = "ticket"
#Standard name for the parameter containing the service url (callback url).
CONST_SERVICE = "service"
#A successful verification of a ticket against a CAS service will contain this XML element.
#A successful verification of a ticket against a CAS service will contain
# this XML element.
CONST_AUTHSUCCESS = "authenticationSuccess"
#If a success full verification of a CAS ticket has been perform, the uid will be containd in a XML element
#If a success full verification of a CAS ticket has been perform, the uid
# will be containd in a XML element
#with this name.
CONST_USER = "user"
#Used for preventing replay attacks.
CONST_NONCE = "nonce"
#Parameter name for queries to be sent back on the URL, after successful authentication.
#Parameter name for queries to be sent back on the URL, after successful
# authentication.
CONST_QUERY = "query"
#The name for the CAS cookie, containing query parameters and nonce.
CONST_CAS_COOKIE = "cascookie"
def __init__(self, srv, cas_server, service_url, return_to, extra_validation = None):
def __init__(self, srv, cas_server, service_url, return_to,
extra_validation=None):
"""
Constructor for the class.
:param srv: Usually none, but otherwise the oic server.
:param cas_server: Base URL to the cas server.
:param service_url: BASE url to the service that will use CAS. In this case the oic server's verify URL.
:param return_to: The URL to return to after a successful authentication.
:param service_url: BASE url to the service that will use CAS. In
this case the oic server's verify URL.
:param return_to: The URL to return to after a successful
authentication.
"""
UserAuthnMethod.__init__(self, srv)
self.cas_server = cas_server
@ -50,30 +56,34 @@ class CasAuthnMethod(UserAuthnMethod):
self.return_to = return_to
self.extra_validation = extra_validation
def createRedirect(self, query):
def create_redirect(self, query):
"""
Performs the redirect to the CAS server.
:rtype : Response
:param query: All query parameters to be added to the return_to URL after successful authentication.
:param query: All query parameters to be added to the return_to URL
after successful authentication.
:return: A redirect response to the CAS server.
"""
acr = None
try:
req = urlparse.parse_qs(query)
acr = req['acr_values'][0]
except:
pass
except KeyError:
acr = None
nonce = uuid.uuid4().get_urn()
service_url = urllib.urlencode({self.CONST_SERVICE: self.getServiceUrl(nonce, acr)})
service_url = urllib.urlencode(
{self.CONST_SERVICE: self.get_service_url(nonce, acr)})
cas_url = self.cas_server + self.CONST_CASLOGIN + service_url
cookie = self.create_cookie('{"' + self.CONST_NONCE + '": "' + base64.b64encode(nonce) + '", "' +
self.CONST_QUERY + '": "' + base64.b64encode(query) + '"}', self.CONST_CAS_COOKIE,
self.CONST_CAS_COOKIE)
cookie = self.create_cookie(
'{"' + self.CONST_NONCE + '": "' + base64.b64encode(
nonce) + '", "' +
self.CONST_QUERY + '": "' + base64.b64encode(query) + '"}',
self.CONST_CAS_COOKIE,
self.CONST_CAS_COOKIE)
return Redirect(cas_url, headers=[cookie])
def handleCallback(self, ticket, service_url):
def handle_callback(self, ticket, service_url):
"""
Handles the callback from the CAS server.
@ -99,9 +109,9 @@ class CasAuthnMethod(UserAuthnMethod):
return None
def __call__(self, query, *args, **kwargs):
return self.createRedirect(query)
return self.create_redirect(query)
def getServiceUrl(self, nonce, acr):
def get_service_url(self, nonce, acr):
"""
Creates the service url for the CAS server.
@ -111,7 +121,8 @@ class CasAuthnMethod(UserAuthnMethod):
"""
if acr is None:
acr = ""
return self.service_url + "?" + self.CONST_NONCE + "=" + nonce + "&acr_values=" + acr
return self.service_url + "?" + self.CONST_NONCE + "=" + nonce + \
"&acr_values=" + acr
def verify(self, request, cookie, **kwargs):
"""
@ -121,7 +132,8 @@ class CasAuthnMethod(UserAuthnMethod):
:param request: Contains the request parameters.
:param cookie: Cookies sent with the request.
:param kwargs: Any other parameters.
:return: If the authentication was successful: a redirect to the return_to url.
:return: If the authentication was successful: a redirect to the
return_to url.
Otherwise a unauthorized response.
:raise: ValueError
"""
@ -138,14 +150,16 @@ class CasAuthnMethod(UserAuthnMethod):
data = json.loads(cas_cookie)
nonce = base64.b64decode(data[self.CONST_NONCE])
if nonce != _dict[self.CONST_NONCE][0]:
logger.warning('Someone tried to login without a correct nonce!')
logger.warning(
'Someone tried to login without a correct nonce!')
return Unauthorized("You are not authorized!")
acr = None
try:
acr = _dict["acr_values"][0]
except:
except KeyError:
pass
uid = self.handleCallback(_dict[self.CONST_TICKET], self.getServiceUrl(nonce, acr))
uid = self.handle_callback(_dict[self.CONST_TICKET],
self.get_service_url(nonce, acr))
if uid is None or len(uid) == 0:
logger.info('Someone tried to login, but was denied by CAS!')
return Unauthorized("You are not authorized!")
@ -158,6 +172,6 @@ class CasAuthnMethod(UserAuthnMethod):
return_to += base64.b64decode(data[self.CONST_QUERY])
return Redirect(return_to, headers=[cookie])
except:
logger.fatal('Metod verify in user_cas.py had a fatal exception.', exc_info=True)
logger.fatal('Metod verify in user_cas.py had a fatal exception.',
exc_info=True)
return Unauthorized("You are not authorized!")

View File

@ -280,7 +280,7 @@ def get_or_post(environ):
_method = environ["REQUEST_METHOD"]
if _method == "GET":
data = environ.get["QUERY_STRING"]
data = environ.get("QUERY_STRING", "")
elif _method == "POST":
data = get_post(environ)
else: