updated examples

This commit is contained in:
Roland Hedberg
2009-11-25 17:28:37 +01:00
parent 1f4b9bb2ee
commit 7f6c6ad90f
3 changed files with 19 additions and 27 deletions

View File

@@ -110,7 +110,7 @@ def application(environ, start_response):
from repoze.who.config import make_middleware_with_config
app_with_auth = make_middleware_with_config(application, {"here":"."},
'./who_saml2.ini', log_file="repo.log")
'./who.ini', log_file="repo.log")
# ----------------------------------------------------------------------------

View File

@@ -1,24 +1,29 @@
{
"service": ["sp"],
"entityid" : "urn:mace:example.com:saml:sp",
"service_url" : "http://example.com:8087/",
"idp_url" : "https://example.com/saml2/idp/SSOService.php",
"my_name" : "My first SP",
"entityid" : "urn:mace:umu.se:saml:roland:sp",
"service": {
"sp":{
"name" : "Rolands SP",
"url" : "http://localhost:8087/",
"required_attributes": ["surName", "givenName", "mail"],
"optional_attributes": ["title"],
"idp": {
"" : "https://example.com/saml2/idp/SSOService.php",
},
}
},
"debug" : 1,
"key_file" : "./mykey.pem",
"cert_file" : "./mycert.pem",
"xmlsec_binary" : "/opt/local/bin/xmlsec1",
"organization": {
"name": "Example Co",
#display_name
"name": "Example Co.",
"display_name": "Example Company",
"url":"http://www.example.com/",
},
"contact": [{
"given_name":"John",
"sur_name": "Smith",
"email_address": "john.smith@example.com",
#contact_type
#company
#telephone_number
"contact_type": "technical",
}]
}

View File

@@ -4,7 +4,7 @@ use = repoze.who.plugins.auth_tkt:make_plugin
secret = kasamark
cookie_name = pysaml2
secure = False
include_ip = False
include_ip = True
timeout = 3600
reissue_time = 3000
@@ -18,23 +18,10 @@ rememberer_name = auth_tkt
debug = 1
path_logout = .*/logout.*
# CHALLENGE DECIDER
# @param:
# - path_login : those regexp indicate which url should be redirected for a challenge
# e.g. : for SAML2, will be redirected on a "/saml2/login" like url
[plugin:decider]
use = repoze.who.plugins.saml2.challenge_decider:make_plugin
path_login =
.*/login$
[general]
request_classifier = repoze.who.classifiers:default_request_classifier
request_classifier = s2repoze.plugins.challenge_decider:my_request_classifier
challenge_decider = repoze.who.classifiers:default_challenge_decider
remote_user_key = REMOTE_USER
# trick : target the plugin whose name is the same
challenge_decider = decider
[identifiers]
# plugin_name;classifier_name:.. or just plugin_name (good for any)