Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

Commit

Permalink
Fixed which didn't make it possible to test the solution
Browse files Browse the repository at this point in the history
  • Loading branch information
dv10den committed Feb 13, 2014
1 parent 7b4ff6e commit 355970d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
24 changes: 10 additions & 14 deletions oc3/oc_config.py.example
Expand Up @@ -6,26 +6,23 @@ baseurl = "https://localhost"
issuer = "%s:%%d" % baseurl
keys = {
"RSA": {
"key": "oc_keys/key.pem",
"key": "cp_keys/key.pem",
"usage": ["enc", "sig"]
}
}

# ..... If you want to use CAS authentication ....
#AUTHN = "CasAuthnMethod"
CAS_SERVER = "https://cas.umu.se"
CAS_SERVER = "https://cas.umu.se"
SERVICE_URL = "%s/verify" % issuer

#Only Username and password.
AUTHORIZATION = {
#"CAS" : {"ACR": "CAS", "WEIGHT": 1, "URL": SERVICE_URL},
"UserPassword" : {"ACR": "PASSWORD", "WEIGHT": 1, "URL": SERVICE_URL}
}
# ..... Otherwise
#AUTHN = "Simple"

COOKIENAME = 'pyoic'
COOKIETTL = 4 * 60 # 4 hours
SYM_KEY = "So Little-Time,G" # len must be 16 if AES 128 which is default
COOKIENAME= 'pyoic'
COOKIETTL = 4*60 # 4 hours
SYM_KEY = "SoLittleTime,Got"
SERVER_CERT = "certs/server.crt"
SERVER_KEY = "certs/server.key"
#CERT_CHAIN="certs/chain.pem"
Expand Down Expand Up @@ -78,12 +75,11 @@ USERDB = {

# ======= DISTRIBUTED CLAIMS ===========

#CLAIMS_PROVIDER = "https://localhost:8093/"
CLAIMS_PROVIDER = ""
CLAIMS_PROVIDER = "https://localhost:8093/"

CLIENT_INFO = {
CLAIMS_PROVIDER: {
"userclaims_endpoint": "%suserclaims" % CLAIMS_PROVIDER,
"userclaims_endpoint":"%suserclaims" % CLAIMS_PROVIDER,
"client_id": "client_1",
"client_secret": "hemlig",
"x509_url": "%scp_keys/cert.pem" % CLAIMS_PROVIDER,
Expand All @@ -107,8 +103,8 @@ LDAP = {
}

LDAP_EXTRAVALIDATION = {
"verifyAttr": "eduPersonAffiliation",
"verifyAttrValid": ['employee', 'staff', 'student']
"verify_attr": "eduPersonAffiliation",
"verify_attr_valid": ['employee', 'staff', 'student']
}

USERINFO = "SIMPLE"
Expand Down
4 changes: 2 additions & 2 deletions src/oic/utils/authn/user.py
Expand Up @@ -7,7 +7,7 @@
from urlparse import urlsplit
import urlparse
import ldap
from oic.utils.aes_m2c import AES_decrypt
from oic.utils.aes import decrypt
from oic.utils.http_util import Response
from oic.utils.http_util import CookieDealer
from oic.utils.http_util import InvalidCookieSign
Expand Down Expand Up @@ -303,7 +303,7 @@ def authenticated_as(self, cookie=None, authorization="", **kwargs):
"""
(encmsg, iv) = base64.b64decode(authorization).split(":")
try:
user = AES_decrypt(self.symkey, encmsg, iv)
user = decrypt(self.symkey, encmsg, iv)
except (AssertionError, KeyError):
raise FailedAuthentication()

Expand Down

0 comments on commit 355970d

Please sign in to comment.