Skip to content

Commit 8f0f22f

Browse files
committed
Fix typos
1 parent 06a4389 commit 8f0f22f

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

README.md

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ This version supports Python3. Python 2 support was deprecated on Jan 1st, 2020:
1313

1414
#### Warning ####
1515

16+
Version 1.16.X is the latest version supporting Python2, consider its use deprecated. 1.17 won't be Python2 and old Python3 compatible.
17+
1618
Version 1.13.0 sets sha256 and rsa-sha256 as default algorithms
1719

1820
Version 1.8.0 sets strict mode active by default
@@ -154,13 +156,13 @@ A replay attack is basically try to reuse an intercepted valid SAML Message in o
154156
SAML Messages have a limited timelife (NotBefore, NotOnOrAfter) that
155157
make harder this kind of attacks, but they are still possible.
156158

157-
In order to avoid them, the SP can keep a list of SAML Messages or Assertion IDs alredy valdidated and processed. Those values only need
159+
In order to avoid them, the SP can keep a list of SAML Messages or Assertion IDs already validated and processed. Those values only need
158160
to be stored the amount of time of the SAML Message life time, so
159161
we don't need to store all processed message/assertion Ids, but the most recent ones.
160162

161163
The OneLogin_Saml2_Auth class contains the [get_last_request_id](https://github.com/onelogin/python3-saml/blob/ab62b0d6f3e5ac2ae8e95ce3ed2f85389252a32d/src/onelogin/saml2/auth.py#L357), [get_last_message_id](https://github.com/onelogin/python3-saml/blob/ab62b0d6f3e5ac2ae8e95ce3ed2f85389252a32d/src/onelogin/saml2/auth.py#L364) and [get_last_assertion_id](https://github.com/onelogin/python3-saml/blob/ab62b0d6f3e5ac2ae8e95ce3ed2f85389252a32d/src/onelogin/saml2/auth.py#L371) methods to retrieve the IDs
162164

163-
Checking that the ID of the current Message/Assertion does not exists in the lis of the ones already processed will prevent replay attacks.
165+
Checking that the ID of the current Message/Assertion does not exists in the list of the ones already processed will prevent replay attacks.
164166

165167

166168
Getting Started
@@ -297,9 +299,9 @@ This is the ``settings.json`` file:
297299
},
298300
// If you need to specify requested attributes, set a
299301
// attributeConsumingService. nameFormat, attributeValue and
300-
// friendlyName can be ommited
302+
// friendlyName can be omitted
301303
"attributeConsumingService": {
302-
// OPTIONAL: only specifiy if SP requires this.
304+
// OPTIONAL: only specify if SP requires this.
303305
// index is an integer which identifies the attributeConsumingService used
304306
// to the SP. SAML toolkit supports configuring only one attributeConsumingService
305307
// but in certain cases the SP requires a different value. Defaults to '1'.
@@ -366,7 +368,7 @@ This is the ``settings.json`` file:
366368
/*
367369
* Instead of using the whole X.509cert you can use a fingerprint in order to
368370
* validate a SAMLResponse (but you still need the X.509cert to validate LogoutRequest and LogoutResponse using the HTTP-Redirect binding).
369-
* But take in mind that the algortithm for the fingerprint should be as strong as the algorithm in a normal certificate signature
371+
* But take in mind that the algorithm for the fingerprint should be as strong as the algorithm in a normal certificate signature
370372
* (e.g. SHA256 or strong)
371373
*
372374
* (openssl x509 -noout -fingerprint -in "idp.crt" to generate it,
@@ -501,7 +503,7 @@ In addition to the required settings data (idp, sp), extra settings can be defin
501503
'allowRepeatAttributeName': false,
502504

503505
// If the toolkit receive a message signed with a
504-
// deprecated algoritm (defined at the constant class)
506+
// deprecated algorithm (defined at the constant class)
505507
// will raise an error and reject the message
506508
"rejectDeprecatedAlgorithm": true
507509
},
@@ -520,7 +522,7 @@ In addition to the required settings data (idp, sp), extra settings can be defin
520522
},
521523

522524
// Organization information template, the info in en_US lang is
523-
// recomended, add more if required.
525+
// recommended, add more if required.
524526
"organization": {
525527
"en-US": {
526528
"name": "sp_test",
@@ -677,7 +679,8 @@ req = prepare_request_for_toolkit(request)
677679
auth = OneLogin_Saml2_Auth(req) # Constructor of the SP, loads settings.json
678680
# and advanced_settings.json
679681

680-
auth.login() # Method that builds and sends the AuthNRequest
682+
auth.login() # This method will build and return a AuthNRequest URL that can be
683+
# either redirected to, or printed out onto the screen as a hyperlink
681684
```
682685

683686
The ``AuthNRequest`` will be sent signed or unsigned based on the security info of the ``advanced_settings.json`` file (i.e. ``authnRequestsSigned``).
@@ -690,7 +693,7 @@ We can set a ``return_to`` url parameter to the login function and that will be
690693
target_url = 'https://example.com'
691694
auth.login(return_to=target_url)
692695
```
693-
The login method can recieve 3 more optional parameters:
696+
The login method can receive 3 more optional parameters:
694697

695698
* ``force_authn`` When ``true``, the ``AuthNReuqest`` will set the ``ForceAuthn='true'``
696699
* ``is_passive`` When true, the ``AuthNReuqest`` will set the ``Ispassive='true'``
@@ -769,7 +772,7 @@ Notice that we saved the user data in the session before the redirection to have
769772
In order to retrieve attributes we use:
770773

771774
```python
772-
attributes = auth.get_attributes();
775+
attributes = auth.get_attributes()
773776
```
774777

775778
With this method we get a dict with all the user data provided by the IdP in the assertion of the SAML response.
@@ -785,12 +788,12 @@ If we execute print attributes we could get:
785788
}
786789
```
787790

788-
Each attribute name can be used as a key to obtain the value. Every attribute is a list of values. A single-valued attribute is a listy of a single element.
791+
Each attribute name can be used as a key to obtain the value. Every attribute is a list of values. A single-valued attribute is a list of a single element.
789792

790793
The following code is equivalent:
791794

792795
```python
793-
attributes = auth.get_attributes();
796+
attributes = auth.get_attributes()
794797
print(attributes['cn'])
795798

796799
print(auth.get_attribute('cn'))
@@ -813,7 +816,7 @@ if len(errors) == 0:
813816
# the value of the url is a trusted URL.
814817
return redirect(url)
815818
else:
816-
print("Sucessfully Logged out")
819+
print("Successfully Logged out")
817820
else:
818821
print("Error when processing SLO: %s %s" % (', '.join(errors), auth.get_last_error_reason()))
819822
```
@@ -955,7 +958,7 @@ elif 'sls' in request.args: # Single
955958
# the value of the url is a trusted URL.
956959
return redirect(url)
957960
else:
958-
msg = "Sucessfully logged out"
961+
msg = "Successfully logged out"
959962

960963
if len(errors) == 0:
961964
print(msg)
@@ -1071,7 +1074,7 @@ SAML 2 Logout Request class
10711074
* ***get_nameid*** Gets the NameID of the Logout Request Message (returns a string).
10721075
* ***get_issuer*** Gets the Issuer of the Logout Request Message.
10731076
* ***get_session_indexes*** Gets the ``SessionIndexes`` from the Logout Request.
1074-
* ***is_valid*** Checks if the Logout Request recieved is valid.
1077+
* ***is_valid*** Checks if the Logout Request received is valid.
10751078
* ***get_error*** After execute a validation process, if fails this method returns the cause.
10761079
* ***get_xml*** Returns the XML that will be sent as part of the request or that was received at the SP
10771080

@@ -1154,7 +1157,7 @@ Auxiliary class that contains several methods
11541157
* ***get_expire_time*** Compares 2 dates and returns the earliest.
11551158
* ***delete_local_session*** Deletes the local session.
11561159
* ***calculate_X.509_fingerprint*** Calculates the fingerprint of a X.509 cert.
1157-
* ***format_finger_print*** Formates a fingerprint.
1160+
* ***format_finger_print*** Formats a fingerprint.
11581161
* ***generate_name_id*** Generates a nameID.
11591162
* ***get_status*** Gets Status from a Response.
11601163
* ***decrypt_element*** Decrypts an encrypted element.
@@ -1204,7 +1207,7 @@ let's see how fast is it to deploy them.
12041207
The use of a [virtualenv](http://virtualenv.readthedocs.org/en/latest/) is
12051208
highly recommended.
12061209

1207-
Virtualenv helps isolating the python enviroment used to run the toolkit. You
1210+
Virtualenv helps isolating the python environment used to run the toolkit. You
12081211
can find more details and an installation guide in the
12091212
[official documentation](http://virtualenv.readthedocs.org/en/latest/).
12101213

@@ -1500,7 +1503,7 @@ Once the SP is configured, the metadata of the SP is published at the ``/metadat
15001503

15011504
4. We are logged in the app and the user attributes are showed. At this point, we can test the single log out functionality.
15021505

1503-
The single log out funcionality could be tested by 2 ways.
1506+
The single log out functionality could be tested by 2 ways.
15041507

15051508
5.1 SLO Initiated by SP. Click on the "logout" link at the SP, after that a Logout Request is sent to the IdP, the session at the IdP is closed and replies through the client to the SP with a Logout Response (sent to the Single Logout Service endpoint). The SLS endpoint /?sls of the SP process the Logout Response and if is valid, close the user session of the local app. Notice that the SLO Workflow starts and ends at the SP.
15061509

0 commit comments

Comments
 (0)