AWS Security ChangesHomeSearch

AWS code-library documentation change

Service: code-library · 2026-01-25 · Documentation low

File: code-library/latest/ug/cognito-identity-provider_example_cognito-identity-provider_AssociateSoftwareToken_section.md

Summary

Added SAP ABAP code example for AssociateSoftwareToken operation

Security assessment

Documents secure MFA token association process, enhancing security feature documentation without fixing a specific vulnerability

Diff

diff --git a/code-library/latest/ug/cognito-identity-provider_example_cognito-identity-provider_AssociateSoftwareToken_section.md b/code-library/latest/ug/cognito-identity-provider_example_cognito-identity-provider_AssociateSoftwareToken_section.md
index 92ff6ef00..254838a57 100644
--- a//code-library/latest/ug/cognito-identity-provider_example_cognito-identity-provider_AssociateSoftwareToken_section.md
+++ b//code-library/latest/ug/cognito-identity-provider_example_cognito-identity-provider_AssociateSoftwareToken_section.md
@@ -285,0 +286,34 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+SAP ABAP
+    
+
+**SDK for SAP ABAP**
+    
+
+###### Note
+
+There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/sap-abap/services/cgp#code-examples). 
+    
+    
+        TRY.
+            DATA(lo_result) = lo_cgp->associatesoftwaretoken(
+              iv_session = iv_session
+            ).
+    
+            ov_secret_code = lo_result->get_secretcode( ).
+    
+            MESSAGE 'MFA secret code generated successfully.' TYPE 'I'.
+    
+          CATCH /aws1/cx_cgpresourcenotfoundex INTO DATA(lo_ex).
+            MESSAGE 'Session not found or expired.' TYPE 'E'.
+    
+          CATCH /aws1/cx_cgpnotauthorizedex INTO DATA(lo_auth_ex).
+            MESSAGE 'Not authorized to associate software token.' TYPE 'E'.
+        ENDTRY.
+    
+    
+
+  * For API details, see [AssociateSoftwareToken](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) in _AWS SDK for SAP ABAP API reference_. 
+
+
+
+