Skip to content

Commit 4c8db53

Browse files
committed
Fix minor errors of demo-bottle and add some documentation
1 parent b75e06c commit 4c8db53

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Key features:
5757
* **Easy to use** - Programmer will be allowed to code high-level and
5858
low-level programming, 2 easy to use APIs are available.
5959
* **Tested** - Thoroughly tested.
60-
* **Popular** - OneLogin's customers use it. Add easy support to your django/flask web projects.
60+
* **Popular** - OneLogin's customers use it. Add easy support to your django/flask/bottle web projects.
6161

6262

6363
Installation
@@ -108,7 +108,7 @@ Getting started
108108

109109
### Knowing the toolkit ###
110110

111-
The new OneLogin SAML Toolkit contains different folders (certs, lib, demo-django, demo-flask and tests) and some files.
111+
The new OneLogin SAML Toolkit contains different folders (certs, lib, demo-django, demo-flask, demo-bottle and tests) and some files.
112112

113113
Let's start describing them:
114114

@@ -140,6 +140,11 @@ If you want to create self-signed certs, you can do it at the https://www.samlto
140140
openssl req -new -x509 -days 3652 -nodes -out sp.crt -keyout saml.key
141141
```
142142

143+
#### demo-bottle ####
144+
145+
This folder contains a Bottle project that will be used as demo to show how to add SAML support to the Bottle Framework. index.py contains all the logic of the demo project, 'templates' is the Bottle templates of the project and 'saml' is a folder that contains the 'certs' folder that could be used to store the x509 public and private key, and the saml toolkit settings (settings.json and advanced_settings.json).
146+
147+
143148
#### demo-flask ####
144149

145150
This folder contains a Flask project that will be used as demo to show how to add SAML support to the Flask Framework. 'index.py' is the main flask file that has all the code, this file uses the templates stored at the 'templates' folder. In the 'saml' folder we found the 'certs' folder to store the x509 public and private key, and the saml toolkit settings (settings.json and advanced_settings.json).
@@ -176,7 +181,7 @@ There are two ways to provide the settings information:
176181

177182
* Use a json object with the setting data and provide it directly to the constructor of the class (if your toolkit integation requires certs, remember to provide the 'custom_base_path' as part of the settings or as a parameter in the constructor.
178183

179-
In the demo-django and in the demo-flask folders you will find a 'saml' folder, inside there is a 'certs' folder and a settings.json and a advanced_settings.json files. Those files contain the settings for the saml toolkit. Copy them in your project and set the correct values.
184+
In the demo-django, demo-flask and demo-bottle folders you will find a 'saml' folder, inside there is a 'certs' folder and a settings.json and a advanced_settings.json files. Those files contain the settings for the saml toolkit. Copy them in your project and set the correct values.
180185

181186
This is the settings.json file:
182187

demo-bottle/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def prepare_bottle_request(req):
3939
}
4040

4141

42-
@app.route('/acs', method='POST')
42+
@app.route('/acs/', method='POST')
4343
@jinja2_view('index.html', template_lookup=['templates'])
4444
def index():
4545
req = prepare_bottle_request(request)

demo-bottle/saml/advanced_settings.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"signMetadata": false,
88
"wantMessagesSigned": false,
99
"wantAssertionsSigned": false,
10-
"wantNameIdEncrypted": false
10+
"wantNameIdEncrypted": false,
11+
"signatureAlgorithm": "http://www.w3.org/2000/09/xmldsig#rsa-sha1"
1112
},
1213
"contactPerson": {
1314
"technical": {
@@ -26,4 +27,4 @@
2627
"url": "http://sp.example.com"
2728
}
2829
}
29-
}
30+
}

demo-bottle/saml/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"sp": {
55
"entityId": "https://<sp_domain>/metadata/",
66
"assertionConsumerService": {
7-
"url": "https://<sp_domain>/?acs",
7+
"url": "https://<sp_domain/acs/",
88
"binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
99
},
1010
"singleLogoutService": {

0 commit comments

Comments
 (0)