A collection of script examples to be used with ThousandEyes Web Transaction tests
Executing transactions against the Duo API can provide key insights into the authentication
experience of your users, allowing you to proactively detect issues, and quickly verify user reports.
The Duo preauth transaction determines whether a user is authorized to log in, and (if so) returns
the user's available authentication factors. This transaction exercises various components of the
Duo Auth API without requiring a user bypass code.
The Duo auth transaction actually completes an authentication transaction, verifying more of the Duo
subsystems than the preauth transaction, but it requires the use of a bypass code.
In order to setup this transaction you should follow the "First Steps" section of the
Duo Auth API documentation. You must identify the
following details:
Credential Repository
.Transaction Script
field.Save
or verify with Run Once
The ThousandEyes Recorder IDE can also be used to test these transaction locally on your desktop
ThousandEyes HTTP Server Tests are fairly flexible in the ways that you can configure the
transaction, but there are some limitations to the test type. You may want to use a different
HTTP method, have a dynamic payload, or specify a nuanced validation criteria. While the HTTP
Server test type cannot support this, the Web Transaction test type can!
This example implements a client_credentials grant type OAuth authentication, followed by an API
request using the resulting auth token. It enables easy configuration of both the Authentication
stage as well as the API request, and provides both HTTP status code and regex based validation.
You should identify the configuration details of both the authentication and API transaction. As
the Web Transaction test also contains an HTTP Server view component, you should also identify an
appropriate URL for the HTTP Server configuration. The best option would be a basic 'ping' or
health API that functions without authentication and a GET http method.
Credential Repository
.Transaction Script
field.Save
or verify with Run Once
The ThousandEyes Recorder IDE can also be used to test these transaction locally on your desktop
Owner
Contributors
Categories
ObservabilitySecurityProducts
DuoThousandEyesProgramming Languages
JavaScriptLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community