- Authenticate with Azure AD and obtain an access token.
- Store and reuse cookies (e.g.,
AspNetCore.Antiforgery,AspNetCore.Cookies). - Call endpoints with correct headers while handling stateful session data.
Example test script for LoadForge
This script:- Logs in to Azure AD using client credentials.
- Stores and manages cookies and tokens.
- Executes requests in a simulated user flow.
Key Features
-
OAuth2 Token Handling
- Retrieves an access token from Azure AD.
- Uses client credentials flow (modify if using user authentication).
-
Session Management
- Stores ASP.NET Core antiforgery tokens and cookies dynamically.
- Ensures requests include required headers.
-
User Flow Simulation
- Starts with a login request to set up cookies.
- Calls
/dashboard(or another resource) with authentication headers. - Simulates an event signup to test form submissions.
Modifications for Your Portal
- Update Azure AD settings (replace
YOUR_TENANT_ID,YOUR_CLIENT_ID, etc.). - Change request endpoints (
/login,/dashboard,/event/signup) to match your portal. - Modify authentication grant type if using authorization code flow.