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
Copy file name to clipboardExpand all lines: README.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -854,6 +854,13 @@ The 'x509certMulti' is an array with 2 keys:
854
854
- 'encryption' An array with one unique cert that will be used to encrypt data to be sent to the IdP.
855
855
856
856
857
+
### Replay attacks ###
858
+
859
+
In order to avoid replay attacks, you can store the ID of the SAML messages already processed, to avoid processing them twice. Since the Messages expires and will be invalidated due that fact, you don't need to store those IDs longer than the time frame that you currently accepting.
860
+
861
+
Get the ID of the last processed message/assertion with the get_last_message_id/get_last_assertion_id method of the Auth object.
862
+
863
+
857
864
### Main classes and methods ###
858
865
859
866
Described below are the main classes and methods that can be invoked from the SAML2 library.
@@ -885,6 +892,9 @@ Main class of OneLogin Python Toolkit
885
892
****set_strict*** Set the strict mode active/disable.
886
893
****get_last_request_xml*** Returns the most recently-constructed/processed XML SAML request (AuthNRequest, LogoutRequest)
887
894
****get_last_response_xml*** Returns the most recently-constructed/processed XML SAML response (SAMLResponse, LogoutResponse). If the SAMLResponse had an encrypted assertion, decrypts it.
895
+
****get_last_message_id*** The ID of the last Response SAML message processed.
896
+
****get_last_assertion_id*** The ID of the last assertion processed.
897
+
****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)
888
898
889
899
####OneLogin_Saml2_Auth - authn_request.py####
890
900
@@ -913,6 +923,9 @@ SAML 2 Authentication Response class
913
923
****validate_timestamps*** Verifies that the document is valid according to Conditions Element
914
924
****get_error*** After execute a validation process, if fails this method returns the cause
915
925
****get_xml_document*** Returns the SAML Response document (If contains an encrypted assertion, decrypts it).
926
+
****get_id*** the ID of the response
927
+
****get_assertion_id*** the ID of the assertion in the response
928
+
****get_assertion_not_on_or_after*** the NotOnOrAfter value of the valid SubjectConfirmationData if any
0 commit comments