forked from SAML-Toolkits/python-saml
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
819 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[run] | ||
source = demo_pyramid | ||
omit = demo_pyramid/test* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
*.egg | ||
*.egg-info | ||
*.pyc | ||
*$py.class | ||
*~ | ||
.coverage | ||
coverage.xml | ||
build/ | ||
dist/ | ||
.tox/ | ||
nosetests.xml | ||
env*/ | ||
tmp/ | ||
.cache/* | ||
Data.fs* | ||
*.sublime-project | ||
*.sublime-workspace | ||
.*.sw? | ||
.sw? | ||
.DS_Store | ||
coverage | ||
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
0.0 | ||
--- | ||
|
||
- Initial version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include *.txt *.ini *.cfg *.rst | ||
recursive-include demo_pyramid *.ico *.png *.css *.gif *.jpg *.pt *.txt *.mak *.mako *.js *.html *.xml *.jinja2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
demo_pyramid | ||
=============================== | ||
|
||
Getting Started | ||
--------------- | ||
|
||
- Change directory into your newly created project. | ||
|
||
cd demo_pyramid | ||
|
||
- Create a Python virtual environment. | ||
|
||
python -m venv env | ||
|
||
- Upgrade packaging tools. | ||
|
||
env/bin/pip install --upgrade pip setuptools | ||
|
||
- Install the project in editable mode with its testing requirements. | ||
|
||
env/bin/pip install -e ".[testing]" | ||
|
||
- Run your project's tests. | ||
|
||
env/bin/pytest | ||
|
||
- Run your project. | ||
|
||
env/bin/pserve development.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from pyramid.config import Configurator | ||
from pyramid.session import SignedCookieSessionFactory | ||
|
||
|
||
session_factory = SignedCookieSessionFactory('onelogindemopytoolkit') | ||
|
||
|
||
def main(global_config, **settings): | ||
""" This function returns a Pyramid WSGI application. | ||
""" | ||
config = Configurator(settings=settings) | ||
config.set_session_factory(session_factory) | ||
config.include('pyramid_jinja2') | ||
config.add_static_view('static', 'static', cache_max_age=3600) | ||
config.add_route('index', '/') | ||
config.add_route('attrs', '/attrs/') | ||
config.add_route('metadata', '/metadata/') | ||
config.scan() | ||
return config.make_wsgi_app() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"security": { | ||
"nameIdEncrypted": false, | ||
"authnRequestsSigned": false, | ||
"logoutRequestSigned": false, | ||
"logoutResponseSigned": false, | ||
"signMetadata": false, | ||
"wantMessagesSigned": false, | ||
"wantAssertionsSigned": false, | ||
"wantNameId" : true, | ||
"wantNameIdEncrypted": false, | ||
"wantAssertionsEncrypted": false, | ||
"signatureAlgorithm": "http://www.w3.org/2000/09/xmldsig#rsa-sha1", | ||
"digestAlgorithm": "http://www.w3.org/2000/09/xmldsig#sha1" | ||
}, | ||
"contactPerson": { | ||
"technical": { | ||
"givenName": "technical_name", | ||
"emailAddress": "technical@example.com" | ||
}, | ||
"support": { | ||
"givenName": "support_name", | ||
"emailAddress": "support@example.com" | ||
} | ||
}, | ||
"organization": { | ||
"en-US": { | ||
"name": "sp_test", | ||
"displayname": "SP test", | ||
"url": "http://sp.example.com" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Take care of this folder that could contain private key. Be sure that this folder never is published. | ||
|
||
Onelogin Python Toolkit expects that certs for the SP could be stored in this folder as: | ||
|
||
* sp.key Private Key | ||
* sp.crt Public cert | ||
|
||
Also you can use other cert to sign the metadata of the SP using the: | ||
|
||
* metadata.key | ||
* metadata.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"strict": true, | ||
"debug": true, | ||
"sp": { | ||
"entityId": "https://<sp_domain>/metadata/", | ||
"assertionConsumerService": { | ||
"url": "https://<sp_domain>/?acs", | ||
"binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" | ||
}, | ||
"singleLogoutService": { | ||
"url": "https://<sp_domain>/?sls", | ||
"binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" | ||
}, | ||
"NameIDFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", | ||
"x509cert": "", | ||
"privateKey": "" | ||
}, | ||
"idp": { | ||
"entityId": "https://app.onelogin.com/saml/metadata/<onelogin_connector_id>", | ||
"singleSignOnService": { | ||
"url": "https://app.onelogin.com/trust/saml2/http-post/sso/<onelogin_connector_id>", | ||
"binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" | ||
}, | ||
"singleLogoutService": { | ||
"url": "https://app.onelogin.com/trust/saml2/http-redirect/slo/<onelogin_connector_id>", | ||
"binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" | ||
}, | ||
"x509cert": "<onelogin_connector_cert>" | ||
} | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.