Replies: 1 comment
-
any updates? http:
- method: GET
path:
- "{{BaseURL}}"
extractors:
- type: regex
part: all
internal: true
name: loginurl
regex:
- "https:\\/\\/(login\\.microsoftonline\\.(com|us|cn)"
- method: GET
path:
- "{{loginurl}}" Reported Error
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
hello @ehsandeep
Capturing multiple values via extractors regex
I want to make multiple iterations of the request below, how should I write it?
thanks
I know that the following can take effect when the variable is a collection, but I am not sure whether the extractors rules can capture a collection and use it for iteration
In addition, can you give an example on how to define global variables so that they can be referenced in yaml? For example definition: token:
([A-Za-z0-9-]+.[A-Za-z0-9-]+.[A-Za-z0-9-_]{256})|([ A-Za-z0-9+/]{48,172}=*)|([A-Za-z0-9+/=]{256})|([A-Za-z0-9]{32,128} )|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F ]{4}-[0-9a-fA-F]{12})
OAuth 2.0 access token:
Length: 32 bits
Regular:[A-Za-z0-9]{32}
JWT token:
Length: 256 bits
Regular: [A-Za-z0-9+/=]{256}
Session token:
Length: 128 bits
Regular:[A-Za-z0-9]{128}
CSRF token:
Length: 32 bits
Regular:[A-Za-z0-9]{32}
Analysis:
OAuth 2.0 access token and CSRF token use random 32 digits of letters and numbers
JWT token uses Base64 encoding, so it contains letters, numbers and +/= symbols, and is 256 bits in length
Session token uses 128 random digits of letters and numbers
Both use [] to match a specified number of characters, and {n} to match exactly n characters.
Add A-Za-z0-9 to match all uppercase and lowercase letters and numbers
The addition of +/= in the JWT token indicates that it also matches the special symbols contained in Base64.
Beta Was this translation helpful? Give feedback.
All reactions