You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An explanation of some advanced request parameters:
563
+
564
+
*`https` - Defaults to "off". Set this to "on" if you receive responses over HTTPS.
565
+
566
+
*`lowercase_urlencoding` - Defaults to `false`. ADFS users should set this to `true`.
567
+
568
+
*`request_uri` - The path where your SAML server recieves requests. Set this if requests are not recieved at the server's root.
569
+
570
+
*`query_string` - Set this with additional query parameters that should be passed to the request endpoint.
571
+
556
572
557
573
#### Initiate SSO ####
558
574
@@ -783,7 +799,7 @@ If a match on the LogoutResponse ID and the LogoutRequest ID to be sent is requi
783
799
auth.get_last_request_id()
784
800
```
785
801
786
-
####Example of a view that initiates the SSO request and handles the response (is the acs target)####
802
+
####Example of a view that initiates the SSO request and handles the response (is the acs target)####
787
803
788
804
We can code a unique file that initiates the SSO process, handle the response, get the attributes, initiate the slo and processes the logout response.
789
805
@@ -836,7 +852,7 @@ else:
836
852
837
853
### SP Key rollover ###
838
854
839
-
If you plan to update the SP x509cert and privateKey you can define the new x509cert as settings['sp']['x509certNew'] and it will be
855
+
If you plan to update the SP x509cert and privateKey you can define the new x509cert as settings['sp']['x509certNew'] and it will be
840
856
published on the SP metadata so Identity Providers can read them and get ready for rollover.
841
857
842
858
@@ -850,7 +866,7 @@ In order to handle that the toolkit offers the settings['idp']['x509certMulti']
850
866
When that parameter is used, 'x509cert' and 'certFingerprint' values will be ignored by the toolkit.
851
867
852
868
The 'x509certMulti' is an array with 2 keys:
853
-
- 'signing'. An array of certs that will be used to validate IdP signature
869
+
- 'signing'. An array of certs that will be used to validate IdP signature
854
870
- 'encryption' An array with one unique cert that will be used to encrypt data to be sent to the IdP.
855
871
856
872
@@ -865,7 +881,7 @@ Get the ID of the last processed message/assertion with the get_last_message_id/
865
881
866
882
Described below are the main classes and methods that can be invoked from the SAML2 library.
867
883
868
-
####OneLogin_Saml2_Auth - auth.py####
884
+
####OneLogin_Saml2_Auth - auth.py####
869
885
870
886
Main class of OneLogin Python Toolkit
871
887
@@ -896,7 +912,7 @@ Main class of OneLogin Python Toolkit
896
912
****get_last_assertion_id*** The ID of the last assertion processed.
897
913
****get_last_assertion_not_on_or_after*** The NotOnOrAfter value of the valid SubjectConfirmationData node (if any) of the last assertion processed (is only calculated with strict = true)
898
914
899
-
####OneLogin_Saml2_Auth - authn_request.py####
915
+
####OneLogin_Saml2_Auth - authn_request.py####
900
916
901
917
SAML 2 Authentication Request class
902
918
@@ -905,7 +921,7 @@ SAML 2 Authentication Request class
905
921
****get_id*** Returns the AuthNRequest ID.
906
922
****get_xml*** Returns the XML that will be sent as part of the request.
907
923
908
-
####OneLogin_Saml2_Response - response.py####
924
+
####OneLogin_Saml2_Response - response.py####
909
925
910
926
SAML 2 Authentication Response class
911
927
@@ -927,7 +943,7 @@ SAML 2 Authentication Response class
927
943
****get_assertion_id*** the ID of the assertion in the response
928
944
****get_assertion_not_on_or_after*** the NotOnOrAfter value of the valid SubjectConfirmationData if any
A class that contains methods to obtain and parse metadata from IdP
1046
1062
@@ -1111,7 +1127,7 @@ Now, with the virtualenv loaded, you can run the demo like this:
1111
1127
1112
1128
You'll have the demo running at http://localhost:8000
1113
1129
1114
-
####Content####
1130
+
####Content####
1115
1131
1116
1132
The flask project contains:
1117
1133
@@ -1123,19 +1139,19 @@ The flask project contains:
1123
1139
****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).
1124
1140
1125
1141
1126
-
####SP setup####
1142
+
####SP setup####
1127
1143
1128
1144
The Onelogin's Python Toolkit allows you to provide the settings info in 2 ways: settings files or define a setting dict. In the demo-flask it used the first method.
1129
1145
1130
1146
In the index.py file we define the app.config['SAML_PATH'], that will target to the 'saml' folder. We require it in order to load the settings files.
1131
1147
1132
1148
First we need to edit the saml/settings.json, configure the SP part and review the metadata of the IdP and complete the IdP info. Later edit the saml/advanced_settings.json files and configure the how the toolkit will work. Check the settings section of this document if you have any doubt.
1133
1149
1134
-
####IdP setup####
1150
+
####IdP setup####
1135
1151
1136
1152
Once the SP is configured, the metadata of the SP is published at the /metadata url. Based on that info, configure the IdP.
1137
1153
1138
-
####How it works####
1154
+
####How it works####
1139
1155
1140
1156
1. First time you access to the main view 'http://localhost:8000', you can select to login and return to the same view or login and be redirected to /?attrs (attrs view).
1141
1157
@@ -1180,7 +1196,7 @@ Note that many of the configuration files expect HTTPS. This is not required by
1180
1196
1181
1197
If you want to integrate a production django application, take a look on this SAMLServiceProviderBackend that uses our toolkit to add SAML support: https://github.com/KristianOellegaard/django-saml-service-provider
1182
1198
1183
-
####Content####
1199
+
####Content####
1184
1200
1185
1201
The django project contains:
1186
1202
@@ -1196,23 +1212,23 @@ The django project contains:
1196
1212
1197
1213
****templates***. Is the folder where django stores the templates of the project. It was implemented a base.html template that is extended by index.html and attrs.html, the templates of our simple demo that shows messages, user attributes when available and login and logout links.
1198
1214
1199
-
####SP setup####
1215
+
####SP setup####
1200
1216
1201
1217
The Onelogin's Python Toolkit allows you to provide the settings info in 2 ways: settings files or define a setting dict. In the demo-django it used the first method.
1202
1218
1203
1219
After set the SAML_FOLDER in the demo/settings.py, the settings of the python toolkit will be loaded on the django web.
1204
1220
1205
1221
First we need to edit the saml/settings.json, configure the SP part and review the metadata of the IdP and complete the IdP info. Later edit the saml/advanced_settings.json files and configure the how the toolkit will work. Check the settings section of this document if you have any doubt.
1206
1222
1207
-
####IdP setup####
1223
+
####IdP setup####
1208
1224
1209
1225
Once the SP is configured, the metadata of the SP is published at the /metadata url. Based on that info, configure the IdP.
1210
1226
1211
-
####How it works####
1227
+
####How it works####
1212
1228
1213
1229
This demo works very similar to the flask-demo (We did it intentionally).
1214
1230
1215
-
###Getting up and running on Heroku###
1231
+
###Getting up and running on Heroku###
1216
1232
1217
1233
Getting python3-saml up and running on Heroku will require some extra legwork: python3-saml depends on python-xmlsec which depends on headers from the xmlsec1-dev linux package to install correctly.
1218
1234
@@ -1262,7 +1278,7 @@ Now you can run the demo like this:
1262
1278
1263
1279
If that worked, the demo is now running at http://localhost:6543.
1264
1280
1265
-
####Content####
1281
+
####Content####
1266
1282
1267
1283
The Pyramid project contains:
1268
1284
@@ -1276,19 +1292,19 @@ The Pyramid project contains:
1276
1292
****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).
1277
1293
1278
1294
1279
-
####SP setup####
1295
+
####SP setup####
1280
1296
1281
1297
The Onelogin's Python Toolkit allows you to provide the settings info in 2 ways: settings files or define a setting dict. In demo_pyramid the first method is used.
1282
1298
1283
1299
In the views.py file we define the SAML_PATH, which will target the 'saml' folder. We require it in order to load the settings files.
1284
1300
1285
1301
First we need to edit the saml/settings.json, configure the SP part and review the metadata of the IdP and complete the IdP info. Later edit the saml/advanced_settings.json files and configure the how the toolkit will work. Check the settings section of this document if you have any doubt.
1286
1302
1287
-
####IdP setup####
1303
+
####IdP setup####
1288
1304
1289
1305
Once the SP is configured, the metadata of the SP is published at the /metadata/ url. Based on that info, configure the IdP.
1290
1306
1291
-
####How it works####
1307
+
####How it works####
1292
1308
1293
1309
1. First time you access to the main view 'http://localhost:6543', you can select to login and return to the same view or login and be redirected to /?attrs (attrs view).
0 commit comments